fix(health): support HEAD method for health endpoint
This commit is contained in:
@@ -60,6 +60,15 @@ class TestHealthEndpoint:
|
||||
|
||||
assert response.status_code == 200
|
||||
|
||||
def test_health_check_head_method(self, test_app):
|
||||
"""Test health check endpoint supports HEAD requests."""
|
||||
with TestClient(test_app) as client:
|
||||
response = client.head("/health")
|
||||
|
||||
assert response.status_code == 200
|
||||
# HEAD requests should not have a response body
|
||||
assert len(response.content) == 0
|
||||
|
||||
def test_root_endpoint(self, test_app):
|
||||
"""Test root endpoint returns service information."""
|
||||
client = TestClient(test_app)
|
||||
|
||||
Reference in New Issue
Block a user