|
|
|
@ -11,7 +11,7 @@ from {{cookiecutter.app_name}}.settings import TestConfig |
|
|
|
|
from .factories import UserFactory |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.yield_fixture(scope='function') |
|
|
|
|
@pytest.fixture |
|
|
|
|
def app(): |
|
|
|
|
"""An application for the tests.""" |
|
|
|
|
_app = create_app(TestConfig) |
|
|
|
@ -23,13 +23,13 @@ def app(): |
|
|
|
|
ctx.pop() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(scope='function') |
|
|
|
|
@pytest.fixture |
|
|
|
|
def testapp(app): |
|
|
|
|
"""A Webtest app.""" |
|
|
|
|
return TestApp(app) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.yield_fixture(scope='function') |
|
|
|
|
@pytest.fixture |
|
|
|
|
def db(app): |
|
|
|
|
"""A database for the tests.""" |
|
|
|
|
_db.app = app |
|
|
|
|