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

Function test_500

tests/test_applications.py:234–238  ·  view source on GitHub ↗
(test_client_factory: TestClientFactory)

Source from the content-addressed store, hash-verified

232
233
234def test_500(test_client_factory: TestClientFactory) -> None:
235 client = test_client_factory(app, raise_server_exceptions=False)
236 response = client.get("/500")
237 assert response.status_code == 500
238 assert response.json() == {"detail": "Server Error"}
239
240
241def test_request_state(client: TestClient) -> None:

Callers

nothing calls this directly

Calls 3

test_client_factoryFunction · 0.85
jsonMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected