flask_template_codex/tests/conftest.py
2026-08-08 02:53:18 +02:00

26 lines
427 B
Python

import pytest
from app import create_app
from app.extensions import db as database
@pytest.fixture()
def app():
application = create_app("testing")
with application.app_context():
database.create_all()
yield application
database.session.remove()
database.drop_all()
@pytest.fixture()
def client(app):
return app.test_client()
@pytest.fixture()
def db():
return database