Test handling of passing in the request uri.
(self)
| 101 | ) |
| 102 | |
| 103 | def test_with_uri(self): |
| 104 | """Test handling of passing in the request uri.""" |
| 105 | resp, content = fake_response( |
| 106 | b"{", |
| 107 | {"status": "400", "content-type": "application/json"}, |
| 108 | reason="Failure", |
| 109 | ) |
| 110 | error = HttpError(resp, content, uri="http://example.org") |
| 111 | self.assertEqual( |
| 112 | str(error), |
| 113 | '<HttpError 400 when requesting http://example.org returned "Failure". Details: "{">', |
| 114 | ) |
| 115 | |
| 116 | def test_missing_message_json_body(self): |
| 117 | """Test handling of bodies with missing expected 'message' element.""" |
nothing calls this directly
no test coverage detected