Guest User

Untitled

a guest
Nov 16th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. import pytest
  2. from flask_app import create_app
  3. from flask_app import db as _db
  4.  
  5.  
  6. @pytest.fixture(scope='session')
  7. def app():
  8. _app = create_app()
  9. _app.debug = True
  10. return _app
  11.  
  12.  
  13. @pytest.fixture(scope='session')
  14. def db(app):
  15. _db.app = app
  16. return _db
  17.  
  18.  
  19. @pytest.fixture(scope='session')
  20. def test_app(app):
  21. return app.test_client()
Add Comment
Please, Sign In to add comment