eventcally/tests/conftest.py
Daniel Grams 273b3fb072 Internal/analysis (#4)
* Codestyle Black

* Flake8

* Test coverage
2020-11-13 23:05:39 +01:00

21 lines
387 B
Python

import pytest
import os
def pytest_generate_tests(metafunc):
os.environ["DATABASE_URL"] = "postgresql://postgres@localhost/gsevpt_tests"
@pytest.fixture
def client():
from project import app, db
app.config["TESTING"] = True
app.testing = True
client = app.test_client()
with app.app_context():
db.drop_all()
db.create_all()
yield client