From: Michael Wood <michael.g.wood@intel.com>
To: toaster@yoctoproject.org
Subject: Re: [review-request][PATCH 3/3] toaster: Test that exception isn't thrown by project page
Date: Wed, 14 Oct 2015 15:10:37 +0100 [thread overview]
Message-ID: <561E625D.3050209@intel.com> (raw)
In-Reply-To: <1442940113-3062-4-git-send-email-elliot.smith@intel.com>
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 <elliot.smith@intel.com>
> ---
> 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)
next prev parent reply other threads:[~2015-10-14 14:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 16:41 [review-request][PATCH 0/3] Fix error thrown by "command line builds" project page Elliot Smith
2015-09-22 16:41 ` [review-request][PATCH 1/3] toaster: Always run bldcontrol migrations Elliot Smith
2015-09-22 16:41 ` [review-request][PATCH 2/3] toaster: Check whether buildrequest exists before using it Elliot Smith
2015-09-22 16:41 ` [review-request][PATCH 3/3] toaster: Test that exception isn't thrown by project page Elliot Smith
2015-10-14 14:10 ` Michael Wood [this message]
2015-09-23 3:26 ` [review-request][PATCH 0/3] Fix error thrown by "command line builds" " Brian Avery
2015-09-23 7:02 ` Smith, Elliot
2015-09-23 13:58 ` Brian Avery
-- strict thread matches above, loose matches on Subject: below --
2015-09-30 14:54 [review-request][PATCH 0/3][v3] Fix errors thrown when viewing command line builds while build is running Elliot Smith
2015-09-30 14:54 ` [review-request][PATCH 3/3] toaster: Test that exception isn't thrown by project page Elliot Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=561E625D.3050209@intel.com \
--to=michael.g.wood@intel.com \
--cc=toaster@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.