aboutsummaryrefslogtreecommitdiff
path: root/app/tests/conftest.py
blob: 1da24d3a9d0dd180e4e05d2b438d9c022cf40f48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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()