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

Method test_json_body

tests/test_json_model.py:67–82  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65 self.assertEqual(body, None)
66
67 def test_json_body(self):
68 model = JsonModel(data_wrapper=False)
69
70 headers = {}
71 path_params = {}
72 query_params = {}
73 body = {}
74
75 headers, unused_params, query, body = model.request(
76 headers, path_params, query_params, body
77 )
78
79 self.assertEqual(headers["accept"], "application/json")
80 self.assertEqual(headers["content-type"], "application/json")
81 self.assertNotEqual(query, "")
82 self.assertEqual(body, "{}")
83
84 def test_json_body_data_wrapper(self):
85 model = JsonModel(data_wrapper=True)

Callers

nothing calls this directly

Calls 2

JsonModelClass · 0.90
requestMethod · 0.45

Tested by

no test coverage detected