diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/tests/conftest.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/tests/conftest.py b/app/tests/conftest.py index 3842091..1da24d3 100644 --- a/app/tests/conftest.py +++ b/app/tests/conftest.py @@ -1,11 +1,17 @@ import pytest from app import app as flask_app +from app import db +import tempfile +import os @pytest.fixture def app(): + flask_app.config['WTF_CSRF_ENABLED'] = False + flask_app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///" + tempfile.mkstemp(suffix='.db')[-1] + db.create_all() yield flask_app @pytest.fixture def client(app): - return app.test_client()
\ No newline at end of file + return app.test_client() |