diff --git a/tests/test_main.py b/tests/test_main.py index 63fa944..de58ec2 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,3 +1,7 @@ +import logging +import re +from types import SimpleNamespace + import pytest from fastapi.testclient import TestClient @@ -24,3 +28,107 @@ def test_hello(params, message): def test_hello_rejects_long_name(): response = client.get("/hello", params={"name": "a" * 65}) assert response.status_code == 422 + + +def test_healthz_corpo(): + response = client.get("/healthz") + assert response.json() == {"status": "ok"} + + +@pytest.mark.parametrize( + "name", + ["a" * 64, "a", "", "José", "日本語", "🚀", "a b&c=d", "