summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoffrey F <f.joffrey@gmail.com>2015-06-30 15:19:14 -0700
committerJoffrey F <f.joffrey@gmail.com>2015-06-30 15:19:14 -0700
commit2d7f1cfa1e3a93fe1aab67a64965fcbeda2fc08d (patch)
tree2eaaf7de2c703c745ab5ba6f8d8abe0f04da379f /tests
parentac90a874be1b306c36a5bb01926ad4ddb6f347f0 (diff)
parent9e87884ba8cbddc0c7f2ad7ccdc11e172e844ac6 (diff)
downloaddocker-py-2d7f1cfa1e3a93fe1aab67a64965fcbeda2fc08d.tar.gz
Merge pull request #651 from docker/fix_647
Fix adapter bug + regression test
Diffstat (limited to 'tests')
-rw-r--r--tests/integration_test.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/integration_test.py b/tests/integration_test.py
index 4b9869e..ac4a871 100644
--- a/tests/integration_test.py
+++ b/tests/integration_test.py
@@ -872,8 +872,8 @@ class TestRunContainerStreaming(BaseTestCase):
id = container['Id']
self.client.start(id)
self.tmp_containers.append(id)
- socket = self.client.attach_socket(container, ws=False)
- self.assertTrue(socket.fileno() > -1)
+ sock = self.client.attach_socket(container, ws=False)
+ self.assertTrue(sock.fileno() > -1)
class TestPauseUnpauseContainer(BaseTestCase):
@@ -1467,12 +1467,17 @@ class TestRegressions(BaseTestCase):
result = self.client.containers(all=True, trunc=True)
self.assertEqual(len(result[0]['Id']), 12)
+ def test_647(self):
+ with self.assertRaises(docker.errors.APIError):
+ self.client.inspect_image('gensokyo.jp//kirisame')
+
def test_649(self):
self.client.timeout = None
ctnr = self.client.create_container('busybox', ['sleep', '2'])
self.client.start(ctnr)
self.client.stop(ctnr)
+
if __name__ == '__main__':
c = docker.Client(base_url=DEFAULT_BASE_URL)
c.pull('busybox')