From 190a0cce25ca9395b58a07512558bdab22207d61 Mon Sep 17 00:00:00 2001 From: Chang Bo Guo Date: Tue, 17 Sep 2013 19:17:29 -0700 Subject: [PATCH] Fix misused assertTrue in unit tests Refactored unit tests to use assertEqual instead of assertTrue where needed. Fixes bug #1226374 Change-Id: I6ba14f94d49e071c4d2208f946befca915c83d53 --- ironic/tests/objects/test_objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ironic/tests/objects/test_objects.py b/ironic/tests/objects/test_objects.py index 29708864a7..1424df09d2 100644 --- a/ironic/tests/objects/test_objects.py +++ b/ironic/tests/objects/test_objects.py @@ -441,7 +441,7 @@ class TestObjectListBase(test_base.TestCase): objlist = Foo() objlist._context = 'foo' objlist.objects = [1, 2, 3] - self.assertTrue(list(objlist), objlist.objects) + self.assertEqual(list(objlist), objlist.objects) self.assertEqual(len(objlist), 3) self.assertIn(2, objlist) self.assertEqual(list(objlist[:1]), [1])