Add Remember flag to Products
This commit is contained in:
@@ -76,3 +76,13 @@ def test_product_model_same_store_fails(session):
|
||||
|
||||
with pytest.raises(IntegrityError):
|
||||
session.commit()
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_product_model_remembers_by_default(session):
|
||||
"""Test that the Product defaults to remembering."""
|
||||
p = Product(name='Eggs', category='Dairy')
|
||||
session.add(p)
|
||||
session.commit()
|
||||
|
||||
assert p.remember is True
|
||||
|
||||
Reference in New Issue
Block a user