Explain the "why" in a few more comments
Comments that only repeated the code are removed.
This commit is contained in:
parent
51f68743e5
commit
f90f263dab
1 changed files with 8 additions and 10 deletions
|
|
@ -8,7 +8,7 @@ from tests.db.fake_data import factories
|
|||
@pytest.fixture
|
||||
def make_address(city):
|
||||
"""Replaces `AddressFactory.build()`: Create an `Address` in the `city`."""
|
||||
# Reset the identifiers before every test
|
||||
# Identifiers start at 1 in every test, independent of the test order
|
||||
factories.AddressFactory.reset_sequence(1)
|
||||
|
||||
def func(**kwargs):
|
||||
|
|
@ -25,7 +25,7 @@ def make_address(city):
|
|||
@pytest.fixture
|
||||
def make_courier():
|
||||
"""Replaces `CourierFactory.build()`: Create a `Courier`."""
|
||||
# Reset the identifiers before every test
|
||||
# Identifiers start at 1 in every test, independent of the test order
|
||||
factories.CourierFactory.reset_sequence(1)
|
||||
|
||||
def func(**kwargs):
|
||||
|
|
@ -38,7 +38,7 @@ def make_courier():
|
|||
@pytest.fixture
|
||||
def make_customer():
|
||||
"""Replaces `CustomerFactory.build()`: Create a `Customer`."""
|
||||
# Reset the identifiers before every test
|
||||
# Identifiers start at 1 in every test, independent of the test order
|
||||
factories.CustomerFactory.reset_sequence(1)
|
||||
|
||||
def func(**kwargs):
|
||||
|
|
@ -51,7 +51,7 @@ def make_customer():
|
|||
@pytest.fixture
|
||||
def make_restaurant(make_address):
|
||||
"""Replaces `RestaurantFactory.build()`: Create a `Restaurant`."""
|
||||
# Reset the identifiers before every test
|
||||
# Identifiers start at 1 in every test, independent of the test order
|
||||
factories.RestaurantFactory.reset_sequence(1)
|
||||
|
||||
def func(address=None, **kwargs):
|
||||
|
|
@ -74,7 +74,7 @@ def make_restaurant(make_address):
|
|||
@pytest.fixture
|
||||
def make_order(make_address, make_courier, make_customer, make_restaurant):
|
||||
"""Replaces `OrderFactory.build()`: Create a `Order`."""
|
||||
# Reset the identifiers before every test
|
||||
# Identifiers start at 1 in every test, independent of the test order
|
||||
factories.AdHocOrderFactory.reset_sequence(1)
|
||||
|
||||
def func(*, scheduled=False, restaurant=None, courier=None, **kwargs):
|
||||
|
|
@ -119,7 +119,7 @@ def make_order(make_address, make_courier, make_customer, make_restaurant):
|
|||
@pytest.fixture
|
||||
def make_replay_order(make_order, simulation):
|
||||
"""Replaces `ReplayedOrderFactory.build()`: Create a `ReplayedOrder`."""
|
||||
# Reset the identifiers before every test
|
||||
# Identifiers start at 1 in every test, independent of the test order
|
||||
factories.ReplayedOrderFactory.reset_sequence(1)
|
||||
|
||||
def func(*, scheduled=False, order=None, **kwargs):
|
||||
|
|
|
|||
Loading…
Reference in a new issue