CICD/app/test/fixtures.py
2019-08-03 12:55:38 -04:00

25 lines
339 B
Python

import pytest
from app import create_app
@pytest.fixture
def app():
return create_app("test")
@pytest.fixture
def client(app):
return app.test_client()
@pytest.fixture
def db(app):
from app import db
with app.app_context():
db.create_all()
yield db
db.drop_all()
db.session.commit()