[Toaster] [review-request][PATCH 4/4] toaster: Fix test broken during rebase

Elliot Smith elliot.smith at intel.com
Tue Sep 29 08:41:46 PDT 2015


The project builds page now shows latest builds as well as
all builds for the project (as of
d48b7ef607372488c1bf50762e4ca21773bf1e9a).

This broke one of the tests during the rebase. This fixes the
test to look for two instances of "bash:clean".

Signed-off-by: Elliot Smith <elliot.smith at intel.com>
---
 bitbake/lib/toaster/toastergui/tests.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/toaster/toastergui/tests.py b/bitbake/lib/toaster/toastergui/tests.py
index fc6bc8e..b69ac04 100644
--- a/bitbake/lib/toaster/toastergui/tests.py
+++ b/bitbake/lib/toaster/toastergui/tests.py
@@ -558,13 +558,19 @@ class ProjectBuildsDisplayTest(TestCase):
         self.assertEqual(len(build_rows), 2)
 
     def test_show_tasks_in_projectbuilds(self):
+        """
+        Test that builds show tasks in both the project builds
+        and all builds areas
+        """
         build = Build.objects.create(**self.project1_build_success)
         target = Target.objects.create(build=build, target='bash',
                                        task='clean')
         url = reverse("projectbuilds", args=(self.project1.id,))
         response = self.client.get(url, follow=True)
         result = re.findall('^ +bash:clean$', response.content, re.MULTILINE)
-        self.assertEqual(len(result), 1)
+        self.assertEqual(len(result),
+                         2,
+                        'build should appear in latest builds and all builds')
 
     def test_show_tasks_in_allbuilds(self):
         build = Build.objects.create(**self.project1_build_success)
-- 
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.



More information about the toaster mailing list