Updated test products to give greater variety

This commit is contained in:
2024-01-29 20:52:39 +00:00
parent a40f99f832
commit ba42909459
3 changed files with 41 additions and 37 deletions

View File

@ -49,10 +49,10 @@ def test_search_term():
db = ProductController()
# Check each search term for correct amount of test products
assert len(db.read_all(search_term="test")) == 33
assert len(db.read_all("Car Parts", "test")) == 9
assert len(db.read_all(search_term="product")) == 1
assert db.read_all(search_term="not_test") is None
assert len(db.read_all(search_term="Alloy")) == 9
assert len(db.read_all("Car Parts", "tur")) == 2
assert len(db.read_all(search_term="fold")) == 8
assert db.read_all(search_term="Twin") is None
# Test we the same product details get returned from the database