15 lines
345 B
Python
15 lines
345 B
Python
import pytest
|
|
from app.main import app
|
|
|
|
@pytest.fixture
|
|
def client():
|
|
app.config['TESTING'] = True
|
|
with app.test_client() as client:
|
|
yield client
|
|
|
|
def test_health_check(client):
|
|
"""Test the health check endpoint."""
|
|
rv = client.get('/health')
|
|
assert rv.status_code == 200
|
|
assert rv.get_json() == {'status': 'UP'}
|