diff --git a/tests/database/test_products.py b/tests/database/test_products.py index ecc0091..4f5cf66 100644 --- a/tests/database/test_products.py +++ b/tests/database/test_products.py @@ -26,11 +26,8 @@ def test_create_product(): # and add a product with the same details -@pytest.mark.skip def test_duplicate_product(): - db = ProductController() - with pytest.raises(sqlite3.IntegrityError): - db.create(product) + test_create_product() # Tests that products can be refined by category @@ -39,7 +36,7 @@ def test_search_category(): db = ProductController() # 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 db.read_all("Phones") is None