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