Fixed all pep8 warnings
This commit is contained in:
@ -22,7 +22,8 @@ def test_create_product():
|
||||
db = ProductController()
|
||||
db.create(product)
|
||||
|
||||
# Tests the database maintains integrity when we try and add a product with the same details
|
||||
# Tests the database maintains integrity when we try
|
||||
# and add a product with the same details
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
@ -40,7 +41,7 @@ def test_search_category():
|
||||
# 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("Books")) == 9
|
||||
assert db.read_all("Phones") == None
|
||||
assert db.read_all("Phones") is None
|
||||
|
||||
|
||||
# Tests that products can be refined by search term
|
||||
@ -51,7 +52,7 @@ def test_search_term():
|
||||
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") == None
|
||||
assert db.read_all(search_term="not_test") is None
|
||||
|
||||
# Test we the same product details get returned from the database
|
||||
|
||||
|
@ -29,7 +29,8 @@ def test_create_user():
|
||||
db = UserController()
|
||||
db.create(customer)
|
||||
|
||||
# Tests the database maintains integrity when we try and add a user with the same details
|
||||
# Tests the database maintains integrity when we try
|
||||
# and add a user with the same details
|
||||
|
||||
|
||||
def test_duplicate_user():
|
||||
|
Reference in New Issue
Block a user