adding test coverage

This commit is contained in:
Naoki Shima
2023-02-15 10:35:41 +09:00
parent 01c895dbbb
commit 98cf8a78a1
2 changed files with 13 additions and 0 deletions

View File

@@ -67,3 +67,9 @@ def test_cache_response_obj() -> None:
assert get_cache_response.json() == {"a": 1}
assert get_cache_response.headers.get("cache-control")
assert get_cache_response.headers.get("etag")
def test_kwargs() -> None:
with TestClient(app) as client:
name = "Jon"
response = client.get("/kwargs", params = {"name": name})
assert response.json() == {"name": name}