Merge branch 'long2ice:main' into fix/piclke-coder

This commit is contained in:
Ivan Moiseev
2023-01-11 16:26:05 +03:00
committed by GitHub
7 changed files with 51 additions and 14 deletions

View File

@@ -57,3 +57,13 @@ def test_sync() -> None:
with TestClient(app) as client:
response = client.get("/sync-me")
assert response.json() == 42
def test_cache_response_obj() -> None:
with TestClient(app) as client:
cache_response = client.get("cache_response_obj")
assert cache_response.json() == {"a": 1}
get_cache_response = client.get("cache_response_obj")
assert get_cache_response.json() == {"a": 1}
assert get_cache_response.headers.get("cache-control")
assert get_cache_response.headers.get("etag")