summaryrefslogtreecommitdiff
path: root/tests/integration/api_client_test.py
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2017-01-25 16:31:43 -0800
committerJoffrey F <joffrey@docker.com>2017-01-25 16:52:26 -0800
commita1d550a14c188dd9ce30d6344e35c5e48ad8f75d (patch)
tree60a433e24cbd7a92cac8d2074c7d621560c8aea2 /tests/integration/api_client_test.py
parent4ff77dc1c910e07117c925cf0f9784529f3bd8d5 (diff)
downloaddocker-py-config_test_api_version.tar.gz
Allow configuring API version for integration test with env varconfig_test_api_version
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'tests/integration/api_client_test.py')
-rw-r--r--tests/integration/api_client_test.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/integration/api_client_test.py b/tests/integration/api_client_test.py
index dab8ddf..8f6a375 100644
--- a/tests/integration/api_client_test.py
+++ b/tests/integration/api_client_test.py
@@ -25,8 +25,7 @@ class InformationTest(BaseAPIIntegrationTest):
self.assertIn('Debug', res)
def test_search(self):
- client = docker.APIClient(timeout=10, **kwargs_from_env())
- res = client.search('busybox')
+ res = self.client.search('busybox')
self.assertTrue(len(res) >= 1)
base_img = [x for x in res if x['name'] == 'busybox']
self.assertEqual(len(base_img), 1)
@@ -126,8 +125,11 @@ class AutoDetectVersionTest(unittest.TestCase):
class ConnectionTimeoutTest(unittest.TestCase):
def setUp(self):
self.timeout = 0.5
- self.client = docker.api.APIClient(base_url='http://192.168.10.2:4243',
- timeout=self.timeout)
+ self.client = docker.api.APIClient(
+ version=docker.constants.MINIMUM_DOCKER_API_VERSION,
+ base_url='http://192.168.10.2:4243',
+ timeout=self.timeout
+ )
def test_timeout(self):
start = time.time()