From 6e0b5a8d700562d1991c73b49fc30ebd81983c45 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Wed, 25 Mar 2015 15:49:57 -0700 Subject: [PATCH] Added assertIn shim for py2.6 --- tests/test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test.py b/tests/test.py index 5941f9bb..2661a457 100644 --- a/tests/test.py +++ b/tests/test.py @@ -111,6 +111,11 @@ class DockerClientTest(Cleanup, unittest.TestCase): def tearDown(self): self.client.close() + def assertIn(self, object, collection): + if six.PY2 and sys.version_info[1] <= 6: + return self.assertTrue(object in collection) + return super(DockerClientTest, self).assertIn(object, collection) + def base_create_payload(self, img='busybox', cmd=None): if not cmd: cmd = ['true']