launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #00151
[Merge] lp:~jtv/launchpad/test-cruft-blueprints into lp:launchpad/devel
Jeroen T. Vermeulen has proposed merging lp:~jtv/launchpad/test-cruft-blueprints into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers): code
Removes test boilerplate that we no longer need from Blueprints, and fixes lint in affected tests.
--
https://code.launchpad.net/~jtv/launchpad/test-cruft-blueprints/+merge/30201
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/launchpad/test-cruft-blueprints into lp:launchpad/devel.
=== modified file 'lib/lp/blueprints/browser/tests/test_breadcrumbs.py'
--- lib/lp/blueprints/browser/tests/test_breadcrumbs.py 2010-04-28 10:13:00 +0000
+++ lib/lp/blueprints/browser/tests/test_breadcrumbs.py 2010-07-18 00:41:43 +0000
@@ -1,10 +1,8 @@
-# Copyright 2009 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
__metaclass__ = type
-import unittest
-
from canonical.launchpad.webapp.publisher import canonical_url
from lp.testing.breadcrumbs import BaseBreadcrumbTestCase
@@ -25,13 +23,15 @@
self.product, rootsite='blueprints')
def test_product(self):
- crumbs = self.getBreadcrumbsForObject(self.product, rootsite='blueprints')
+ crumbs = self.getBreadcrumbsForObject(
+ self.product, rootsite='blueprints')
last_crumb = crumbs[-1]
self.assertEquals(last_crumb.url, self.product_specs_url)
self.assertEquals(last_crumb.text, 'Blueprints')
def test_person(self):
- crumbs = self.getBreadcrumbsForObject(self.person, rootsite='blueprints')
+ crumbs = self.getBreadcrumbsForObject(
+ self.person, rootsite='blueprints')
last_crumb = crumbs[-1]
self.assertEquals(last_crumb.url, self.person_specs_url)
self.assertEquals(last_crumb.text, 'Blueprints')
@@ -55,8 +55,3 @@
self.assertEquals(last_crumb.url, self.specification_url)
self.assertEquals(
last_crumb.text, self.specification.title)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
-
=== modified file 'lib/lp/blueprints/browser/tests/test_hasspecifications.py'
--- lib/lp/blueprints/browser/tests/test_hasspecifications.py 2010-05-27 04:10:17 +0000
+++ lib/lp/blueprints/browser/tests/test_hasspecifications.py 2010-07-18 00:41:43 +0000
@@ -3,8 +3,6 @@
__metaclass__ = type
-import unittest
-
from lp.testing import login_person, TestCaseWithFactory
from lp.testing.views import create_initialized_view
from canonical.testing import DatabaseFunctionalLayer
@@ -28,7 +26,3 @@
label = 'Blueprint workload'
self.assertEqual(label, view.label)
self.assertEqual(20, view.members.batch.size)
-
-
-def test_suite():
- return unittest.TestLoader().loadTestsFromName(__name__)
=== modified file 'lib/lp/blueprints/browser/tests/test_specification.py'
--- lib/lp/blueprints/browser/tests/test_specification.py 2009-06-25 00:00:26 +0000
+++ lib/lp/blueprints/browser/tests/test_specification.py 2010-07-18 00:41:43 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
__metaclass__ = type
@@ -15,7 +15,9 @@
from lp.blueprints.browser import specification
+
class LocalFakeRequest(FakeRequest):
+
@property
def stepstogo(self):
"""See IBasicLaunchpadRequest.
@@ -134,4 +136,3 @@
if __name__ == '__main__':
unittest.TextTestRunner().run(test_suite())
-