flask-semanticui/test_sample.py
2020-03-14 18:56:04 +01:00

29 lines
435 B
Python

import pytest
@pytest.fixture
def app():
import sys
sys.path.append('.')
from sample import create_app
app = create_app()
app.debug = True
app.testing = True
# manually add flask-debug
from flask_debug import Debug
Debug(app)
return app
@pytest.fixture
def client(app):
return app.test_client()
def test_index(client):
resp = client.get('/')
assert resp.status_code == 200