summaryrefslogtreecommitdiffstats
path: root/nova/test.py
diff options
context:
space:
mode:
authorChris Behrens <cbehrens@codestud.com>2011-08-29 01:13:08 -0700
committerChris Behrens <cbehrens@codestud.com>2011-08-29 01:13:08 -0700
commit8bfa5e23e90279dfdbef3e38fca810ccca540513 (patch)
treed7b2b6ad2202e36ae1154e48d22f16698568a9d4 /nova/test.py
parent599467124e812eb8ae73eb7a9af3fea71ee25157 (diff)
downloadnova-8bfa5e23e90279dfdbef3e38fca810ccca540513.tar.gz
nova-8bfa5e23e90279dfdbef3e38fca810ccca540513.tar.xz
nova-8bfa5e23e90279dfdbef3e38fca810ccca540513.zip
support the extra optional arguments for msg to assertIn and assertNotIn
Diffstat (limited to 'nova/test.py')
-rw-r--r--nova/test.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/nova/test.py b/nova/test.py
index d1c1ad20e..d759aef60 100644
--- a/nova/test.py
+++ b/nova/test.py
@@ -278,20 +278,20 @@ class TestCase(unittest.TestCase):
else:
self.assertEqual(sub_value, super_value)
- def assertIn(self, a, b):
+ def assertIn(self, a, b, *args, **kwargs):
"""Python < v2.7 compatibility. Assert 'a' in 'b'"""
try:
f = super(TestCase, self).assertIn
except AttributeError:
- self.assertTrue(a in b)
+ self.assertTrue(a in b, *args, **kwargs)
else:
- f(a, b)
+ f(a, b, *args, **kwargs)
- def assertNotIn(self, a, b):
+ def assertNotIn(self, a, b, *args, **kwargs):
"""Python < v2.7 compatibility. Assert 'a' NOT in 'b'"""
try:
f = super(TestCase, self).assertNotIn
except AttributeError:
- self.assertFalse(a in b)
+ self.assertFalse(a in b, *args, **kwargs)
else:
- f(a, b)
+ f(a, b, *args, **kwargs)