()
| 150 | |
| 151 | |
| 152 | def test_http_repr() -> None: |
| 153 | assert repr(HTTPException(404)) == ("HTTPException(status_code=404, detail='Not Found')") |
| 154 | assert repr(HTTPException(404, detail="Not Found: foo")) == ( |
| 155 | "HTTPException(status_code=404, detail='Not Found: foo')" |
| 156 | ) |
| 157 | |
| 158 | class CustomHTTPException(HTTPException): |
| 159 | pass |
| 160 | |
| 161 | assert repr(CustomHTTPException(500, detail="Something custom")) == ( |
| 162 | "CustomHTTPException(status_code=500, detail='Something custom')" |
| 163 | ) |
| 164 | |
| 165 | |
| 166 | def test_websocket_str() -> None: |
nothing calls this directly
no test coverage detected