[bitbake-devel] [PATCH 02/11] toaster: fix test_build_layerversion test case

Michael Wood michael.g.wood at intel.com
Mon Aug 10 11:21:25 UTC 2015


From: Ed Bartosh <ed.bartosh at linux.intel.com>

The reason of test failure is that Django querysets are
different even if they contain the same objects.

Fixed by converting querysets into lists.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood at intel.com>
---
 lib/toaster/orm/tests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/toaster/orm/tests.py b/lib/toaster/orm/tests.py
index df9a2a9..8bb5dec 100644
--- a/lib/toaster/orm/tests.py
+++ b/lib/toaster/orm/tests.py
@@ -117,7 +117,7 @@ class LayerVersionEquivalenceTestCase(TestCase):
         # getting the build layerversion equivalent list must return the same list as the original layer
         build_equivalent_list = self.layerversion_build.get_equivalents_wpriority(self.project)
 
-        self.assertTrue(equivalent_list == build_equivalent_list, "%s is not %s" % (equivalent_list, build_equivalent_list))
+        self.assertEqual(list(equivalent_list), list(build_equivalent_list))
 
 class ProjectLVSelectionTestCase(TestCase):
     def setUp(self):
-- 
2.1.4




More information about the bitbake-devel mailing list