flask_template_codex/tests/conftest.py
2026-08-08 03:00:29 +02:00

25 lines
429 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(app):
return database