Spaces:
Sleeping
Sleeping
File size: 598 Bytes
e3e3a84 c4b28eb e3e3a84 c4b28eb e3e3a84 c4b28eb e3e3a84 c4b28eb e3e3a84 c4b28eb e3e3a84 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
import pytest
from app import app as flask_app
@pytest.fixture
def app():
yield flask_app
@pytest.fixture
def client(app):
return app.test_client()
def test_health_endpoint(client):
"""
Tests the /health endpoint.
"""
response = client.get("/health")
assert response.status_code == 200
assert response.json == {"status": "ok"}
def test_index_endpoint(client):
"""
Tests the / endpoint.
"""
response = client.get("/")
assert response.status_code == 200
assert b"PolicyWise" in response.data
assert b"Coming Soon" in response.data
|