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

Method test_version

tests/unit/client_test.py:48–52  ·  view source on GitHub ↗
(self, mock_func)

Source from the content-addressed store, hash-verified

46
47 @mock.patch('docker.api.APIClient.version')
48 def test_version(self, mock_func):
49 mock_func.return_value = fake_api.get_fake_version()[1]
50 client = docker.from_env(version=DEFAULT_DOCKER_API_VERSION)
51 assert client.version() == mock_func.return_value
52 mock_func.assert_called_with()
53
54 def test_call_api_client_method(self):
55 client = docker.from_env(version=DEFAULT_DOCKER_API_VERSION)

Callers

nothing calls this directly

Calls 2

from_envMethod · 0.80
versionMethod · 0.45

Tested by

no test coverage detected