]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: Fix test for projects page JSON
authorElliot Smith <elliot.smith@intel.com>
Thu, 3 Sep 2015 00:25:11 +0000 (17:25 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 3 Sep 2015 15:51:00 +0000 (16:51 +0100)
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@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/toaster/toastergui/tests.py

index 85e27fe07c23457c470c45ef7b98a86b840c657d..7acf4bc31d7de339688a337a1777072427ff2d86 100644 (file)
@@ -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"""