Debian Codegraph @

examples/fsqlalchemy1/tests/conftest.py

raw
1 # Copyright 2019 by J. Christopher Wagner (jwag). All rights reserved.
2 import pytest
3
4
5 @pytest.fixture
6 def myapp():
7 """
8 Create a wrapped flask app.
9 This is used for unittests that want to mock out all
10 underlying singletons (e.g. blog).
11
12 Assumes that app.security has been set.
13 """
14
15 from fsqlalchemy1.app import create_app
16
17 app = create_app()
18 app.config["TESTING"] = True
19 return app