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
|
|
@ -1,4 +1,4 @@
|
|||
"""Provide the ORM's Restaurant model."""
|
||||
"""Provide the ORM's `Restaurant` model."""
|
||||
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy import orm
|
||||
|
|
@ -7,7 +7,12 @@ from urban_meal_delivery.db import meta
|
|||
|
||||
|
||||
class Restaurant(meta.Base):
|
||||
"""A Restaurant selling meals on the UDP."""
|
||||
"""A restaurant selling meals on the UDP.
|
||||
|
||||
In the historic dataset, a `Restaurant` may have changed its `Address`
|
||||
throughout its life time. The ORM model only stores the current one,
|
||||
which in most cases is also the only one.
|
||||
"""
|
||||
|
||||
__tablename__ = 'restaurants'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue