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

Method test_body

tests/test_protobuf_model.py:66–79  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

64 self.assertEqual(body, None)
65
66 def test_body(self):
67 headers = {}
68 path_params = {}
69 query_params = {}
70 body = MockProtocolBuffer("data")
71
72 headers, params, query, body = self.model.request(
73 headers, path_params, query_params, body
74 )
75
76 self.assertEqual(headers["accept"], "application/x-protobuf")
77 self.assertEqual(headers["content-type"], "application/x-protobuf")
78 self.assertNotEqual(query, "")
79 self.assertEqual(body, "data")
80
81 def test_good_response(self):
82 resp = httplib2.Response({"status": "200"})

Callers

nothing calls this directly

Calls 2

MockProtocolBufferClass · 0.85
requestMethod · 0.45

Tested by

no test coverage detected