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

Method test_with_uri

tests/test_errors.py:103–114  ·  view source on GitHub ↗

Test handling of passing in the request uri.

(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

HttpErrorClass · 0.90
fake_responseFunction · 0.85

Tested by

no test coverage detected