Merge lp://qastaging/~benji/launchpad/bug-607154 into lp://qastaging/launchpad

Proposed by Benji York
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 11249
Proposed branch: lp://qastaging/~benji/launchpad/bug-607154
Merge into: lp://qastaging/launchpad
Diff against target: 226 lines (+114/-25)
3 files modified
lib/canonical/launchpad/webapp/publication.py (+31/-24)
lib/canonical/launchpad/webapp/servers.py (+13/-1)
lib/canonical/launchpad/webapp/tests/test_pageid.py (+70/-0)
To merge this branch: bzr merge lp://qastaging/~benji/launchpad/bug-607154
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+30578@code.qastaging.launchpad.net

Description of the change

Calls to the web service generate page IDs that aren't as helpful as
they could be because the named operation is not included and is often a
critical differentiator (see bug 607154).

In this branch the named operation (if any) is appended to the page ID
(after a colon).

This was done by refactoring the page ID generation code out of
lib/canonical/launchpad/webapp/publication.py:LaunchpadBrowserPublication.callObject
and into its own method (LaunchpadBrowserPublication.constructPageID)
and then overriding constructPageID in WebServicePublication to add the
new behavior.

The behavior and approach were discussed with Gary and Leonard.

To run the tests for the new behavior run

    bin/test -t test_pageid

I also cleaned up quite a bit of lint. Most of it was whitespace or
silencing false positives. I could not force this lint to be silent
though (suggestions welcome):

./lib/canonical/launchpad/webapp/publication.py
     193: E231 missing whitespace after ','

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

+
+
+def test_suite():
+ return unittest.TestLoader().loadTestsFromName(__name__)

Thats noise - its not needed - please remove.

review: Approve
Revision history for this message
Benji York (benji) wrote :

On Wed, Jul 21, 2010 at 4:56 PM, Robert Collins
<email address hidden> wrote:
> Review: Approve
> +
> +
> +def test_suite():
> +    return unittest.TestLoader().loadTestsFromName(__name__)
>
>
> Thats noise - its not needed - please remove.

Done.
--
Benji York

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.