summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Pittier <jordan.pittier@scality.com>2016-01-28 17:02:43 +0000
committerJordan Pittier <jordan.pittier@scality.com>2016-01-28 17:46:07 +0000
commitcdec8545b810ac4bdb5f58a3ac53f6b35d4ec2bf (patch)
tree7f58da17d8faffcd603b87a2379ed8f0ea5ec9a5
parente995d73488731c47c2e3cc3de7e0b52869ef298e (diff)
downloadoslo-utils-cdec8545b810ac4bdb5f58a3ac53f6b35d4ec2bf.tar.gz
Revert "Use assertTrue/False instead of assertEqual(T/F)"
assertTrue is weaker than assertEqual(True,..) because assertEqual also compares the type. If we expect a boolean and know that we are getting a boolean then assert for a boolean, not for something that evaluates to true. This reverts commit e995d73488731c47c2e3cc3de7e0b52869ef298e. Change-Id: Ia3c5418b8d98ad23b70c2c0191a64a4f2f590040
-rw-r--r--oslo_utils/tests/test_reflection.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/oslo_utils/tests/test_reflection.py b/oslo_utils/tests/test_reflection.py
index ca4bf30..cca92b8 100644
--- a/oslo_utils/tests/test_reflection.py
+++ b/oslo_utils/tests/test_reflection.py
@@ -290,10 +290,10 @@ class GetCallableArgsTest(test_base.BaseTestCase):
class AcceptsKwargsTest(test_base.BaseTestCase):
def test_no_kwargs(self):
- self.assertFalse(reflection.accepts_kwargs(mere_function))
+ self.assertEqual(False, reflection.accepts_kwargs(mere_function))
def test_with_kwargs(self):
- self.assertTrue(reflection.accepts_kwargs(function_with_kwargs))
+ self.assertEqual(True, reflection.accepts_kwargs(function_with_kwargs))
class GetClassNameTest(test_base.BaseTestCase):