Re-factor the ORM tests to use randomized fake data
- create `*Factory` classes with fakerboy and faker that generate randomized instances of the ORM models - add new pytest marker: "db" are the integration tests involving the database whereas "e2e" will be all other integration tests - streamline the docstrings in the ORM models
This commit is contained in:
parent
416a58f9dc
commit
78dba23d5d
19 changed files with 1092 additions and 721 deletions
14
tests/db/fake_data/__init__.py
Normal file
14
tests/db/fake_data/__init__.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
"""Fixtures for testing the ORM layer with fake data."""
|
||||
|
||||
from tests.db.fake_data.fixture_makers import make_address # noqa:F401
|
||||
from tests.db.fake_data.fixture_makers import make_courier # noqa:F401
|
||||
from tests.db.fake_data.fixture_makers import make_customer # noqa:F401
|
||||
from tests.db.fake_data.fixture_makers import make_order # noqa:F401
|
||||
from tests.db.fake_data.fixture_makers import make_restaurant # noqa:F401
|
||||
from tests.db.fake_data.static_fixtures import address # noqa:F401
|
||||
from tests.db.fake_data.static_fixtures import city # noqa:F401
|
||||
from tests.db.fake_data.static_fixtures import city_data # noqa:F401
|
||||
from tests.db.fake_data.static_fixtures import courier # noqa:F401
|
||||
from tests.db.fake_data.static_fixtures import customer # noqa:F401
|
||||
from tests.db.fake_data.static_fixtures import order # noqa:F401
|
||||
from tests.db.fake_data.static_fixtures import restaurant # noqa:F401
|
||||
Loading…
Add table
Add a link
Reference in a new issue