Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pytest
- from flask_app import create_app
- from flask_app import db as _db
- @pytest.fixture(scope='session')
- def app():
- _app = create_app()
- _app.debug = True
- return _app
- @pytest.fixture(scope='session')
- def db(app):
- _db.app = app
- return _db
- @pytest.fixture(scope='session')
- def test_app(app):
- return app.test_client()
Add Comment
Please, Sign In to add comment