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

Function test_http_str

tests/test_exceptions.py:146–149  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144
145
146def test_http_str() -> None:
147 assert str(HTTPException(status_code=404)) == "404: Not Found"
148 assert str(HTTPException(404, "Not Found: foo")) == "404: Not Found: foo"
149 assert str(HTTPException(404, headers={"key": "value"})) == "404: Not Found"
150
151
152def test_http_repr() -> None:

Callers

nothing calls this directly

Calls 1

HTTPExceptionClass · 0.90

Tested by

no test coverage detected