summaryrefslogtreecommitdiff
path: root/tests/unit/cli/docker_client_test.py
diff options
context:
space:
mode:
authorUlysses Souza <ulyssessouza@gmail.com>2020-08-21 16:42:00 +0200
committerUlysses Souza <ulyssessouza@gmail.com>2020-08-21 18:32:29 +0200
commitb6e84b0f1cc0169c0dcbc96dc0f83907b2966113 (patch)
treecd8bbe3a4317d454f20202b479c0ce83e1a92b96 /tests/unit/cli/docker_client_test.py
parent0dad2367e6ccfcd7b36e77c88cd19322fb90f60f (diff)
Update tests to use the version on docker client
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
Diffstat (limited to 'tests/unit/cli/docker_client_test.py')
-rw-r--r--tests/unit/cli/docker_client_test.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/unit/cli/docker_client_test.py b/tests/unit/cli/docker_client_test.py
index 941aed4f..74e0f9c8 100644
--- a/tests/unit/cli/docker_client_test.py
+++ b/tests/unit/cli/docker_client_test.py
@@ -6,6 +6,7 @@ import docker
import pytest
import compose
+from compose import const
from compose.cli import errors
from compose.cli.docker_client import docker_client
from compose.cli.docker_client import get_tls_version
@@ -23,18 +24,18 @@ class DockerClientTestCase(unittest.TestCase):
del os.environ['HOME']
except KeyError:
pass
- docker_client(os.environ)
+ docker_client(os.environ, version=const.API_VERSIONS[const.COMPOSE_SPEC])
@mock.patch.dict(os.environ)
def test_docker_client_with_custom_timeout(self):
os.environ['COMPOSE_HTTP_TIMEOUT'] = '123'
- client = docker_client(os.environ)
+ client = docker_client(os.environ, version=const.API_VERSIONS[const.COMPOSE_SPEC])
assert client.timeout == 123
@mock.patch.dict(os.environ)
def test_custom_timeout_error(self):
os.environ['COMPOSE_HTTP_TIMEOUT'] = '123'
- client = docker_client(os.environ)
+ client = docker_client(os.environ, version=const.API_VERSIONS[const.COMPOSE_SPEC])
with mock.patch('compose.cli.errors.log') as fake_log:
with pytest.raises(errors.ConnectionError):
@@ -54,7 +55,7 @@ class DockerClientTestCase(unittest.TestCase):
assert '123' in fake_log.error.call_args[0][0]
def test_user_agent(self):
- client = docker_client(os.environ)
+ client = docker_client(os.environ, version=const.API_VERSIONS[const.COMPOSE_SPEC])
expected = "docker-compose/{} docker-py/{} {}/{}".format(
compose.__version__,
docker.__version__,