mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 00:07:22 +00:00
21 lines
387 B
Python
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
|