From a6b2110abd061b0e03d8b684e5a2edd12fbc1c64 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 5 Feb 2015 19:57:26 +0100 Subject: Implement TestCase.assertIn for older versions of Python. Change-Id: I17d855166b439c0bd9344a17a454ea5bc6e057aa Signed-off-by: Jelmer Vernooij Reviewed-by: Andrew Bartlett --- python/samba/tests/__init__.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python') 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) -- cgit v1.2.1