diff options
author | Joffrey F <joffrey@docker.com> | 2015-04-22 17:57:10 -0700 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2015-04-22 18:00:53 -0700 |
commit | 6228929a88575c9c0e250bc1969e9611e542abc4 (patch) | |
tree | b75b732f5acdc3cb74cf65ecece848df9a0f4190 /tests/integration_test.py | |
parent | c328be7deb59077b73d2263cfdf6eaaecc01ad64 (diff) | |
download | docker-py-client_side_trunc.tar.gz |
Handle ID truncate on client side in containers list (and changed default from True to False)client_side_trunc
Diffstat (limited to 'tests/integration_test.py')
-rw-r--r-- | tests/integration_test.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/integration_test.py b/tests/integration_test.py index fe3a339..eb7a0eb 100644 --- a/tests/integration_test.py +++ b/tests/integration_test.py @@ -1681,10 +1681,7 @@ class UnixconnTestCase(unittest.TestCase): # REGRESSION TESTS # #################### -class TestRegressions(unittest.TestCase): - def setUp(self): - self.client = docker.Client(timeout=5, base_url=DEFAULT_BASE_URL) - +class TestRegressions(BaseTestCase): def test_443(self): dfile = io.BytesIO() with self.assertRaises(docker.errors.APIError) as exc: @@ -1693,6 +1690,13 @@ class TestRegressions(unittest.TestCase): self.assertEqual(exc.exception.response.status_code, 500) dfile.close() + def test_542(self): + self.client.start( + self.client.create_container('busybox', ['true']) + ) + result = self.client.containers(trunc=True) + self.assertEqual(len(result[0]['Id']), 12) + if __name__ == '__main__': c = docker.Client(base_url=DEFAULT_BASE_URL) |