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

Method test_user_agent

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

Source from the content-addressed store, hash-verified

144 self.assertEqual(body, "{}")
145
146 def test_user_agent(self):
147 model = JsonModel(data_wrapper=False)
148
149 headers = {"user-agent": "my-test-app/1.23.4"}
150 path_params = {}
151 query_params = {}
152 body = {}
153
154 headers, unused_params, unused_query, body = model.request(
155 headers, path_params, query_params, body
156 )
157
158 self.assertEqual(headers["user-agent"], "my-test-app/1.23.4 (gzip)")
159
160 def test_x_goog_api_client(self):
161 model = JsonModel(data_wrapper=False)

Callers

nothing calls this directly

Calls 2

JsonModelClass · 0.90
requestMethod · 0.45

Tested by

no test coverage detected