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

Method test_serialize_request

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

Source from the content-addressed store, hash-verified

1206 self.assertRaises(BatchError, batch._header_to_id, "<foo>")
1207
1208 def test_serialize_request(self):
1209 batch = BatchHttpRequest()
1210 request = HttpRequest(
1211 None,
1212 None,
1213 "https://www.googleapis.com/someapi/v1/collection/?foo=bar",
1214 method="POST",
1215 body="{}",
1216 headers={"content-type": "application/json"},
1217 methodId=None,
1218 resumable=None,
1219 )
1220 s = batch._serialize_request(request).splitlines()
1221 self.assertEqual(EXPECTED.splitlines(), s)
1222
1223 def test_serialize_request_media_body(self):
1224 batch = BatchHttpRequest()

Callers

nothing calls this directly

Calls 3

_serialize_requestMethod · 0.95
BatchHttpRequestClass · 0.90
HttpRequestClass · 0.90

Tested by

no test coverage detected