MCPcopy Index your code
hub / github.com/googleapis/google-api-python-client / test_missing_reason

Method test_missing_reason

tests/test_errors.py:135–142  ·  view source on GitHub ↗

Test an empty dict with a missing resp.reason.

(self)

Source from the content-addressed store, hash-verified

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."""

Callers

nothing calls this directly

Calls 2

HttpErrorClass · 0.90
fake_responseFunction · 0.85

Tested by

no test coverage detected