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
|
|
@ -222,6 +222,9 @@ def test(session):
|
|||
session.run('poetry', 'install', '--no-dev', external=True)
|
||||
_install_packages(
|
||||
session,
|
||||
'Faker',
|
||||
'factory-boy',
|
||||
'geopy',
|
||||
'packaging',
|
||||
'pytest',
|
||||
'pytest-cov',
|
||||
|
|
@ -242,8 +245,8 @@ def test(session):
|
|||
'--cov-fail-under=100',
|
||||
'--cov-report=term-missing:skip-covered',
|
||||
'--randomly-seed=4287',
|
||||
'-k',
|
||||
'not e2e',
|
||||
'-m',
|
||||
'not (db or e2e)',
|
||||
PYTEST_LOCATION,
|
||||
)
|
||||
session.run('pytest', '--version')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue