eventcally/tests/conftest.py
Daniel Grams d63f340384 Internal/modules (#1)
* Restructured app
* Added Travis CI
* Added 'Deploy to heroku' button
2020-11-13 12:24:26 +01:00

17 lines
383 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