Test handling of bodies with invalid json.
(self)
| 90 | ) |
| 91 | |
| 92 | def test_bad_json_body(self): |
| 93 | """Test handling of bodies with invalid json.""" |
| 94 | resp, content = fake_response( |
| 95 | b"{", {"status": "400", "content-type": "application/json"}, reason="Failed" |
| 96 | ) |
| 97 | error = HttpError(resp, content) |
| 98 | self.assertEqual( |
| 99 | str(error), |
| 100 | '<HttpError 400 when requesting None returned "Failed". Details: "{">', |
| 101 | ) |
| 102 | |
| 103 | def test_with_uri(self): |
| 104 | """Test handling of passing in the request uri.""" |
nothing calls this directly
no test coverage detected