From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id D85DCE00B43; Wed, 14 Oct 2015 07:11:14 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.180 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 7E197E00B2F for ; Wed, 14 Oct 2015 07:11:12 -0700 (PDT) Received: by wicgb1 with SMTP id gb1so232645711wic.1 for ; Wed, 14 Oct 2015 07:11:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=eHgJ/3W6YLglsNJSyEJGmoraGkORrViHPBpyNsxemVk=; b=bBs5YaX1b4usbgeLDpZj1cTb/Lhb+paZJEW9eUNVplM2VN27/zlILx5DnAfRGkx2Pe 8Sx6wQLJkH6c0HxytUYLmis9IKxq68uv0BMPCQ7flsNiNXf+RlJENERBxYMyvFHLM4AN FEve+4c2dN4WpThJm2HCJIQ29z/ZcKMXWrP9GSGmkzJR7Fh+jJettB87BeOmFw+cVgEZ uW7N9ZYKeCki7ePuMfWSL31n3WdD6jzQfx6FRLnb+r3OeJinxkdY+jwtXx5Cdfh+ksgF FRDjVyMP3IB2UR7dO5AuxG8cw8edYJadWOmtWaJI1Buh6vObOUTOspp58r/0AAIn7FAw GmPQ== X-Gm-Message-State: ALoCoQmxrmGX6MU1GYH7E9xZIdehRtZY5PZu3UYPID/GS2CPtb24XGopwczkSJjBuu6a375sBAv7 X-Received: by 10.180.208.82 with SMTP id mc18mr25882480wic.85.1444831839007; Wed, 14 Oct 2015 07:10:39 -0700 (PDT) Received: from [192.168.2.10] ([83.217.123.106]) by smtp.googlemail.com with ESMTPSA id iw8sm10295116wjb.5.2015.10.14.07.10.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 07:10:38 -0700 (PDT) To: toaster@yoctoproject.org References: <1442940113-3062-1-git-send-email-elliot.smith@intel.com> <1442940113-3062-4-git-send-email-elliot.smith@intel.com> From: Michael Wood Message-ID: <561E625D.3050209@intel.com> Date: Wed, 14 Oct 2015 15:10:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <1442940113-3062-4-git-send-email-elliot.smith@intel.com> Subject: Re: [review-request][PATCH 3/3] toaster: Test that exception isn't thrown by project page 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: Wed, 14 Oct 2015 14:11:14 -0000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Thanks - Now pushed to toaster-next and upstream On 22/09/15 17:41, Elliot Smith wrote: > Add a test which checks that an exception is no longer thrown > for the /toastergui/project/X page for the default project. > > Note that we still get a spinning dialogue box on this page > because the default project has no configuration to display, > but at least it doesn't fail altogether. > > [YOCTO #8277] > > Signed-off-by: Elliot Smith > --- > bitbake/lib/toaster/toastergui/tests.py | 33 ++++++++++++++++++++++++++++++++- > 1 file changed, 32 insertions(+), 1 deletion(-) > > diff --git a/bitbake/lib/toaster/toastergui/tests.py b/bitbake/lib/toaster/toastergui/tests.py > index 4d1549b..437a45b 100644 > --- a/bitbake/lib/toaster/toastergui/tests.py > +++ b/bitbake/lib/toaster/toastergui/tests.py > @@ -376,4 +376,35 @@ class ProjectBuildsDisplayTest(TestCase): > build2b = Build.objects.create(**self.project2_build_in_progress) > > build_rows = self._get_rows_for_project(self.project1.id) > - self.assertEqual(len(build_rows), 2) > \ No newline at end of file > + self.assertEqual(len(build_rows), 2) > + > +class ProjectPageTests(TestCase): > + """ Test project data at /project/X/ is displayed correctly """ > + > + PROJECT_NAME = 'Command line builds' > + > + def test_command_line_builds_in_progress(self): > + """ > + In progress builds should not cause an error to be thrown > + when navigating to "command line builds" project page; > + see https://bugzilla.yoctoproject.org/show_bug.cgi?id=8277 > + """ > + > + # add the "command line builds" default project; this mirrors what > + # we do in migration 0026_set_default_project.py > + default_project = Project.objects.create_project(self.PROJECT_NAME, None) > + default_project.is_default = True > + default_project.save() > + > + # add an "in progress" build for the default project > + now = timezone.now() > + build = Build.objects.create(project=default_project, > + started_on=now, > + completed_on=now, > + outcome=Build.IN_PROGRESS) > + > + # navigate to the project page for the default project > + url = reverse("project", args=(default_project.id,)) > + response = self.client.get(url, follow=True) > + > + self.assertEqual(response.status_code, 200)