Spaces:
Sleeping
Sleeping
| import pytest | |
| from app import app as flask_app | |
| def app(): | |
| yield flask_app | |
| 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 | |