mirror of
https://github.com/vale981/flask-semanticui
synced 2025-03-04 08:41:41 -05:00
29 lines
435 B
Python
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
|