MCPcopy
hub / github.com/encode/starlette / test_405

Function test_405

tests/test_applications.py:224–231  ·  view source on GitHub ↗
(client: TestClient)

Source from the content-addressed store, hash-verified

222
223
224def test_405(client: TestClient) -> None:
225 response = client.post("/func")
226 assert response.status_code == 405
227 assert response.json() == {"detail": "Custom message"}
228
229 response = client.post("/class")
230 assert response.status_code == 405
231 assert response.json() == {"detail": "Custom message"}
232
233
234def test_500(test_client_factory: TestClientFactory) -> None:

Callers

nothing calls this directly

Calls 2

jsonMethod · 0.80
postMethod · 0.45

Tested by

no test coverage detected