[bitbake-devel] [PATCH 5/6] toaster: Fix test for projects page JSON
brian avery
avery.brian at gmail.com
Thu Sep 3 00:25:11 UTC 2015
From: Elliot Smith <elliot.smith at intel.com>
The tests expect data to be returned in a particular format,
which doesn't include is_default or the num_builds fields
added to support default project improvements.
Add the extra fields so the tests pass again.
[YOCTO #7932]
Signed-off-by: Elliot Smith <elliot.smith at intel.com>
Signed-off-by: brian avery <avery.brian at gmail.com>
---
lib/toaster/toastergui/tests.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/toaster/toastergui/tests.py b/lib/toaster/toastergui/tests.py
index 85e27fe..7acf4bc 100644
--- a/lib/toaster/toastergui/tests.py
+++ b/lib/toaster/toastergui/tests.py
@@ -40,6 +40,7 @@ class ViewTests(TestCase):
bitbake_version=bbv)
self.project = Project.objects.create_project(name=PROJECT_NAME,
release=release)
+
layersrc = LayerSource.objects.create(sourcetype=LayerSource.TYPE_IMPORTED)
self.priority = ReleaseLayerSourcePriority.objects.create(release=release,
layer_source=layersrc)
@@ -86,10 +87,10 @@ class ViewTests(TestCase):
self.assertEqual(sorted(data["rows"][0]),
['bitbake_version_id', 'created', 'id',
- 'layersTypeAheadUrl', 'name', 'projectBuildsUrl',
- 'projectPageUrl', 'recipesTypeAheadUrl',
- 'release_id', 'short_description', 'updated',
- 'user_id'])
+ 'is_default', 'layersTypeAheadUrl', 'name',
+ 'num_builds', 'projectBuildsUrl', 'projectPageUrl',
+ 'recipesTypeAheadUrl', 'release_id',
+ 'short_description', 'updated', 'user_id'])
def test_typeaheads(self):
"""Test typeahead ReST API"""
--
1.9.1
More information about the bitbake-devel
mailing list