13 lines
291 B
Python
13 lines
291 B
Python
import pytest
|
|
from app.app import app
|
|
|
|
@pytest.fixture
|
|
def client():
|
|
app.config['TESTING'] = True
|
|
with app.test_client() as client:
|
|
yield client
|
|
|
|
def test_index(client):
|
|
rv = client.get('/')
|
|
assert rv.status_code == 200
|
|
assert rv.get_json() == {"Hello": "World"}
|