summaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastergui
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-03-31 19:55:47 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-31 23:56:16 +0100
commit20ce1e1b39a9b602eb51ca0ba3954ea3e999c874 (patch)
tree8aa5bcd64c469745c5ddcbc678db843df271cdc4 /lib/toaster/toastergui
parent0e5f45d68e423f8462937879eed3253db31b2bb5 (diff)
downloadbitbake-20ce1e1b39a9b602eb51ca0ba3954ea3e999c874.tar.gz
toaster: tests Migrate landing page tests to Selenium
Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/toastergui')
-rw-r--r--lib/toaster/toastergui/tests.py74
1 files changed, 0 insertions, 74 deletions
diff --git a/lib/toaster/toastergui/tests.py b/lib/toaster/toastergui/tests.py
index 6975ac1bf..eebd1b79b 100644
--- a/lib/toaster/toastergui/tests.py
+++ b/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 """