Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 35CD8E00C38; Fri, 28 Aug 2015 05:59:29 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [134.134.136.65 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 16340E00B4F for ; Fri, 28 Aug 2015 05:59:28 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 28 Aug 2015 05:59:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,424,1437462000"; d="scan'208";a="757224953" Received: from mozel-mobl1.ger.corp.intel.com (HELO lp.ger.corp.intel.com) ([10.252.17.173]) by orsmga001.jf.intel.com with ESMTP; 28 Aug 2015 05:59:26 -0700 From: Elliot Smith To: toaster@yoctoproject.org Date: Fri, 28 Aug 2015 13:59:15 +0100 Message-Id: <1440766756-15076-6-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1440766756-15076-1-git-send-email-elliot.smith@intel.com> References: <1440766756-15076-1-git-send-email-elliot.smith@intel.com> Subject: [review-request][PATCH 5/6] toaster: Fix test for projects page JSON X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2015 12:59:29 -0000 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 --- bitbake/lib/toaster/toastergui/tests.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/tests.py b/bitbake/lib/toaster/toastergui/tests.py index 85e27fe..7acf4bc 100644 --- a/bitbake/lib/toaster/toastergui/tests.py +++ b/bitbake/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""" -- Elliot Smith Software Engineer Intel OTC --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.