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

Method test_set_user_agent

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

Source from the content-addressed store, hash-verified

188
189class TestUserAgent(unittest.TestCase):
190 def test_set_user_agent(self):
191 http = HttpMockSequence([({"status": "200"}, "echo_request_headers")])
192
193 http = set_user_agent(http, "my_app/5.5")
194 resp, content = http.request("http://example.com")
195 self.assertEqual("my_app/5.5", content["user-agent"])
196
197 def test_set_user_agent_nested(self):
198 http = HttpMockSequence([({"status": "200"}, "echo_request_headers")])

Callers

nothing calls this directly

Calls 3

requestMethod · 0.95
HttpMockSequenceClass · 0.90
set_user_agentFunction · 0.90

Tested by

no test coverage detected