Test an empty dict with a missing resp.reason.
(self)
| 133 | ) |
| 134 | |
| 135 | def test_missing_reason(self): |
| 136 | """Test an empty dict with a missing resp.reason.""" |
| 137 | resp, content = fake_response(b"}NOT OK", {"status": "400"}, reason=None) |
| 138 | error = HttpError(resp, content) |
| 139 | self.assertEqual( |
| 140 | str(error), |
| 141 | '<HttpError 400 when requesting None returned "". Details: "}NOT OK">', |
| 142 | ) |
| 143 | |
| 144 | def test_error_detail_for_missing_message_in_error(self): |
| 145 | """Test handling of data with missing 'details' or 'detail' element.""" |
nothing calls this directly
no test coverage detected