From 7dcb4c41272e8f611eabea991fa30df79b9e48e3 Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Thu, 31 Mar 2016 19:55:47 +0100 Subject: bitbake: toaster: tests Migrate landing page tests to Selenium (Bitbake rev: 20ce1e1b39a9b602eb51ca0ba3954ea3e999c874) Signed-off-by: Elliot Smith Signed-off-by: Michael Wood Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/tests.py | 74 --------------------------------- 1 file changed, 74 deletions(-) (limited to 'bitbake/lib/toaster/toastergui') diff --git a/bitbake/lib/toaster/toastergui/tests.py b/bitbake/lib/toaster/toastergui/tests.py index 6975ac1bfe..eebd1b79ba 100644 --- a/bitbake/lib/toaster/toastergui/tests.py +++ b/bitbake/lib/toaster/toastergui/tests.py @@ -493,80 +493,6 @@ class ViewTests(TestCase): "Changed page on table %s but first row is the " "same as the previous page" % name) -class LandingPageTests(TestCase): - """ Tests for redirects on the landing page """ - # disable bogus pylint message error: - # "Instance of 'WSGIRequest' has no 'url' member (no-member)" - # (see https://github.com/landscapeio/pylint-django/issues/42) - # pylint: disable=E1103 - - LANDING_PAGE_TITLE = 'This is Toaster' - - def setUp(self): - """ Add default project manually """ - self.project = Project.objects.create_project('foo', None) - self.project.is_default = True - self.project.save() - - def test_only_default_project(self): - """ - No projects except default - => get the landing page - """ - response = self.client.get(reverse('landing')) - self.assertTrue(self.LANDING_PAGE_TITLE in response.content) - - def test_default_project_has_build(self): - """ - Default project has a build, no other projects - => get the builds page - """ - now = timezone.now() - build = Build.objects.create(project=self.project, - started_on=now, - completed_on=now) - build.save() - - response = self.client.get(reverse('landing')) - self.assertEqual(response.status_code, 302, - 'response should be a redirect') - self.assertTrue('/builds' in response.url, - 'should redirect to builds') - - def test_user_project_exists(self): - """ - User has added a project (without builds) - => get the projects page - """ - user_project = Project.objects.create_project('foo', None) - user_project.save() - - response = self.client.get(reverse('landing')) - self.assertEqual(response.status_code, 302, - 'response should be a redirect') - self.assertTrue('/projects' in response.url, - 'should redirect to projects') - - def test_user_project_has_build(self): - """ - User has added a project (with builds) - => get the builds page - """ - user_project = Project.objects.create_project('foo', None) - user_project.save() - - now = timezone.now() - build = Build.objects.create(project=user_project, - started_on=now, - completed_on=now) - build.save() - - response = self.client.get(reverse('landing')) - self.assertEqual(response.status_code, 302, - 'response should be a redirect') - self.assertTrue('/builds' in response.url, - 'should redirect to builds') - class BuildDashboardTests(TestCase): """ Tests for the build dashboard /build/X """ -- cgit v1.2.3-54-g00ecf