@@ -115,25 +115,25 @@ def test_alternate_injected_namespace() -> None:
115115
116116def test_cache_control () -> None :
117117 with TestClient (app ) as client :
118- response = client .get ("/uncached_put" )
118+ response = client .put ("/uncached_put" )
119119 assert "X-FastAPI-Cache" not in response .headers
120120 assert response .json () == {"value" : 1 }
121121
122122 # HIT
123- response = client .get ("/uncached_put" )
123+ response = client .put ("/uncached_put" )
124124 assert response .headers .get ("X-FastAPI-Cache" ) == "HIT"
125125 assert response .json () == {"value" : 1 }
126126
127127 # no-cache
128- response = client .get ("/uncached_put" , headers = {"Cache-Control" : "no-cache" })
128+ response = client .put ("/uncached_put" , headers = {"Cache-Control" : "no-cache" })
129129 assert response .json () == {"value" : 2 }
130130
131- response = client .get ("/uncached_put" )
131+ response = client .put ("/uncached_put" )
132132 assert response .json () == {"value" : 2 }
133133
134134 # no-store
135- response = client .get ("/uncached_put" , headers = {"Cache-Control" : "no-store" })
135+ response = client .put ("/uncached_put" , headers = {"Cache-Control" : "no-store" })
136136 assert response .json () == {"value" : 3 }
137137
138- response = client .get ("/uncached_put" )
138+ response = client .put ("/uncached_put" )
139139 assert response .json () == {"value" : 2 }
0 commit comments