[bitbake-devel] [PATCH 09/11] toaster: fix test_get_json_call_returns_json again

Michael Wood michael.g.wood at intel.com
Mon Aug 10 17:27:16 UTC 2015


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

Fixed this test case again after rebase. Improved it
to check for all returned keys. Previously it was checking
only 3 of them.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood at intel.com>
---
 lib/toaster/toastergui/tests.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/toaster/toastergui/tests.py b/lib/toaster/toastergui/tests.py
index 723348d..d155849 100644
--- a/lib/toaster/toastergui/tests.py
+++ b/lib/toaster/toastergui/tests.py
@@ -90,9 +90,13 @@ class ViewTests(TestCase):
 
         self.assertTrue(PROJECT_NAME in [x["name"] for x in data["rows"]])
         self.assertTrue("id" in data["rows"][0])
-        self.assertTrue("projectLayersUrl" in data["rows"][0])
-        self.assertTrue("projectPageUrl" in data["rows"][0])
-        self.assertTrue("projectBuildsUrl" in data["rows"][0])
+
+        self.assertEqual(sorted(data["rows"][0]),
+                         ['bitbake_version_id', 'created', 'id',
+                          'layersTypeAheadUrl', 'name', 'projectBuildsUrl',
+                          'projectPageUrl', 'recipesTypeAheadUrl',
+                          'release_id', 'short_description', 'updated',
+                          'user_id'])
 
     def test_typeaheads(self):
         """Test typeahead ReST API"""
-- 
2.1.4




More information about the bitbake-devel mailing list