test_health.py 294 B

12345678910111213141516
  1. import pytest
  2. from app.app import create_app
  3. @pytest.fixture()
  4. def app():
  5. app = create_app("testing")
  6. return app
  7. def test_health(app):
  8. client = app.test_client()
  9. resp = client.get("/health")
  10. assert resp.status_code == 200
  11. assert resp.get_json() == {"status": "ok"}