| 12345678910111213141516171819202122232425 |
- import pytest
- from app import create_app, db
- @pytest.fixture
- def app():
- """Create application for testing"""
- app = create_app('testing')
-
- with app.app_context():
- db.create_all()
- yield app
- db.drop_all()
- @pytest.fixture
- def client(app):
- """Create test client"""
- return app.test_client()
- @pytest.fixture
- def runner(app):
- """Create test CLI runner"""
- return app.test_cli_runner()
|