Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions tests/unit/app/endpoints/test_health.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from app.endpoints.health import readiness_probe_get_method, liveness_probe_get_method


def test_readiness_probe(mocker):
"""Test the readiness endpoint handler."""
response = readiness_probe_get_method()
assert response is not None
assert response.ready is True
assert response.reason == "service is ready"


def test_liveness_probe(mocker):
"""Test the liveness endpoint handler."""
response = liveness_probe_get_method()
assert response is not None
assert response.alive is True