Added assertIn shim for py2.6

This commit is contained in:
Joffrey F 2015-03-25 15:49:57 -07:00
parent ec85f126ed
commit 6e0b5a8d70
1 changed files with 5 additions and 0 deletions

View File

@ -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']