middleware_app/tests/test_app.py
2025-03-29 21:31:08 -04:00

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"}