Skip to content

Commit 6e0b5a8

Browse files
committed
Added assertIn shim for py2.6
1 parent ec85f12 commit 6e0b5a8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ def setUp(self):
111111
def tearDown(self):
112112
self.client.close()
113113

114+
def assertIn(self, object, collection):
115+
if six.PY2 and sys.version_info[1] <= 6:
116+
return self.assertTrue(object in collection)
117+
return super(DockerClientTest, self).assertIn(object, collection)
118+
114119
def base_create_payload(self, img='busybox', cmd=None):
115120
if not cmd:
116121
cmd = ['true']

0 commit comments

Comments
 (0)