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

Method test_unicode

tests/test_http.py:922–939  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

920
921class TestHttpRequest(unittest.TestCase):
922 def test_unicode(self):
923 http = HttpMock(datafile("zoo.json"), headers={"status": "200"})
924 model = JsonModel()
925 uri = "https://www.googleapis.com/someapi/v1/collection/?foo=bar"
926 method = "POST"
927 request = HttpRequest(
928 http,
929 model.response,
930 uri,
931 method=method,
932 body="{}",
933 headers={"content-type": "application/json"},
934 )
935 request.execute()
936 self.assertEqual(uri, http.uri)
937 self.assertEqual(str, type(http.uri))
938 self.assertEqual(method, http.method)
939 self.assertEqual(str, type(http.method))
940
941 def test_empty_content_type(self):
942 """Test for #284"""

Callers

nothing calls this directly

Calls 5

executeMethod · 0.95
HttpMockClass · 0.90
JsonModelClass · 0.90
HttpRequestClass · 0.90
datafileFunction · 0.70

Tested by

no test coverage detected