fixed tests
This commit is contained in:
parent
522e3ad6ec
commit
41d66c5486
@ -5,15 +5,14 @@ import pytest
|
|||||||
from ayct_backend import create_app
|
from ayct_backend import create_app
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def client():
|
def app():
|
||||||
app = create_app()
|
app = create_app()
|
||||||
app.config['TESTING'] = True
|
|
||||||
app.run(host = '0.0.0.0', port = 5000)
|
|
||||||
|
|
||||||
with app.test_client() as client:
|
yield app
|
||||||
with app.app_context():
|
|
||||||
pass
|
@pytest.fixture
|
||||||
yield client
|
def client(app):
|
||||||
|
yield app.test_client()
|
||||||
|
|
||||||
def test_first_endpoint(client):
|
def test_first_endpoint(client):
|
||||||
rv = client.get("/hello")
|
rv = client.get("/hello")
|
||||||
|
Loading…
Reference in New Issue
Block a user