summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2015-02-05 19:57:26 +0100
committerAndrew Bartlett <abartlet@samba.org>2015-03-06 04:41:49 +0100
commita6b2110abd061b0e03d8b684e5a2edd12fbc1c64 (patch)
tree65204fb4e6092cbbe803e0ff67c7ccf49f3294fa
parentd459096e7c35f7bc7a83fd69cf0f70fc5ae4e15f (diff)
downloadsamba-a6b2110abd061b0e03d8b684e5a2edd12fbc1c64.tar.gz
Implement TestCase.assertIn for older versions of Python.
Change-Id: I17d855166b439c0bd9344a17a454ea5bc6e057aa Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--python/samba/tests/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py
index 413ac69833c..840e5c36285 100644
--- a/python/samba/tests/__init__.py
+++ b/python/samba/tests/__init__.py
@@ -61,6 +61,9 @@ class TestCase(unittest.TestCase):
def skipTest(self, reason):
raise SkipTest(reason)
+ def assertIn(self, member, container, msg=None):
+ self.assertTrue(member in container, msg)
+
def assertIs(self, a, b):
self.assertTrue(a is b)