launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #04428
[Merge] lp:~abentley/launchpad/fix-lpviews into lp:launchpad
Aaron Bentley has proposed merging lp:~abentley/launchpad/fix-lpviews into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #817522 in Launchpad itself: "translation sharing-details page should not require more than two roundtrips"
https://bugs.launchpad.net/launchpad/+bug/817522
For more details, see:
https://code.launchpad.net/~abentley/launchpad/fix-lpviews/+merge/69800
= Summary =
Fix the +translation-graph on ProductSeries, broken by getCacheJSON migration.
== Proposed fix ==
Render ProductSeries using LaunchpadView, rather than Zope's default view.
== Pre-implementation notes ==
None
== Implementation details ==
Now that the LP.cache is generated by LaunchpadView, any pages derived from base-layout require that their view provides getCacheJSON. LaunchpadView satisfies this requirement.
== Tests ==
bin/test -t test_timeline_graph
== Demo and Q/A ==
Go to the overview page for a productseries. The graph should be rendered normally, with no OOPS.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/registry/browser/configure.zcml
lib/lp/registry/browser/tests/test_productseries_views.py
./lib/lp/registry/browser/tests/test_productseries_views.py
22: Line exceeds 78 characters.
23: Line exceeds 78 characters.
28: local variable 'ssh_key' is assigned to but never used
20: W293 blank line contains whitespace
--
https://code.launchpad.net/~abentley/launchpad/fix-lpviews/+merge/69800
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~abentley/launchpad/fix-lpviews into lp:launchpad.
=== modified file 'lib/lp/registry/browser/configure.zcml'
--- lib/lp/registry/browser/configure.zcml 2011-06-22 14:58:39 +0000
+++ lib/lp/registry/browser/configure.zcml 2011-07-29 14:26:15 +0000
@@ -1727,6 +1727,7 @@
template="../templates/pillar-involvement-portlet.pt"/>
<browser:pages
for="lp.registry.interfaces.productseries.IProductSeries"
+ class="canonical.launchpad.webapp.LaunchpadView"
facet="overview"
permission="zope.Public">
<browser:page
=== modified file 'lib/lp/registry/browser/tests/test_productseries_views.py'
--- lib/lp/registry/browser/tests/test_productseries_views.py 2011-05-18 04:12:39 +0000
+++ lib/lp/registry/browser/tests/test_productseries_views.py 2011-07-29 14:26:15 +0000
@@ -7,6 +7,7 @@
from canonical.testing.layers import DatabaseFunctionalLayer
from lp.testing import (
+ BrowserTestCase,
TestCaseWithFactory,
person_logged_in
)
@@ -29,3 +30,13 @@
with person_logged_in(person):
view = create_initialized_view(series, '+code-summary')
self.assertThat(view(), Contains(branch_url))
+
+
+class TestWithBrowser(BrowserTestCase):
+
+ layer = DatabaseFunctionalLayer
+
+ def test_timeline_graph(self):
+ """Test that rendering the graph does not raise an exception."""
+ productseries = self.factory.makeProductSeries()
+ self.getViewBrowser(productseries, view_name='+timeline-graph')