bitbake: toaster: fix test_get_json_call_returns_json again

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

(Bitbake rev: 2deef2e86a09b6cb907bfeff56774f889cfe30a1)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh 2015-08-10 18:27:16 +01:00 committed by Richard Purdie
parent 3ba3cf22d6
commit 27a483dcb3
1 changed files with 7 additions and 3 deletions

View File

@ -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"""