MCPcopy Index your code
hub / github.com/docker/docker-py / test_custom_user_agent

Method test_custom_user_agent

tests/unit/api_test.py:612–620  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

610 assert headers['User-Agent'] == expected
611
612 def test_custom_user_agent(self):
613 client = APIClient(
614 user_agent='foo/bar',
615 version=DEFAULT_DOCKER_API_VERSION)
616 client.version()
617
618 assert self.mock_send.call_count == 1
619 headers = self.mock_send.call_args[0][0].headers
620 assert headers['User-Agent'] == 'foo/bar'
621
622
623class DisableSocketTest(unittest.TestCase):

Callers

nothing calls this directly

Calls 2

APIClientClass · 0.90
versionMethod · 0.45

Tested by

no test coverage detected