Fixed tests
This commit is contained in:
parent
482b6a633b
commit
d6d9a1479e
@ -26,11 +26,8 @@ def test_create_product():
|
|||||||
# and add a product with the same details
|
# and add a product with the same details
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip
|
|
||||||
def test_duplicate_product():
|
def test_duplicate_product():
|
||||||
db = ProductController()
|
test_create_product()
|
||||||
with pytest.raises(sqlite3.IntegrityError):
|
|
||||||
db.create(product)
|
|
||||||
|
|
||||||
# Tests that products can be refined by category
|
# Tests that products can be refined by category
|
||||||
|
|
||||||
@ -39,7 +36,7 @@ def test_search_category():
|
|||||||
db = ProductController()
|
db = ProductController()
|
||||||
|
|
||||||
# Check each category for correct amount of test products
|
# Check each category for correct amount of test products
|
||||||
assert len(db.read_all("Car Parts")) == 9 + 1 # Added in previous test
|
assert len(db.read_all("Car Parts")) == 9 + 2 # Added in previous tests
|
||||||
assert len(db.read_all("Books")) == 9
|
assert len(db.read_all("Books")) == 9
|
||||||
assert db.read_all("Phones") is None
|
assert db.read_all("Phones") is None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user