Merge lp://qastaging/~inspirated/launchpad/export-Person-getBugSubscriberPackages into lp://qastaging/launchpad

Proposed by Kamran Riaz Khan
Status: Superseded
Proposed branch: lp://qastaging/~inspirated/launchpad/export-Person-getBugSubscriberPackages
Merge into: lp://qastaging/launchpad
Diff against target: 49 lines (+19/-0)
3 files modified
lib/canonical/launchpad/interfaces/_schema_circular_imports.py (+4/-0)
lib/lp/registry/interfaces/person.py (+2/-0)
lib/lp/registry/stories/webservice/xx-person.txt (+13/-0)
To merge this branch: bzr merge lp://qastaging/~inspirated/launchpad/export-Person-getBugSubscriberPackages
Reviewer Review Type Date Requested Status
Graham Binns (community) code Needs Fixing
Review via email: mp+27568@code.qastaging.launchpad.net

This proposal has been superseded by a proposal from 2010-06-15.

Commit message

Exported Person.getBugSubscriberPackages()

Description of the change

Summary:
As part of my GSoC 2010 project, functionality is required in Arsenal to search all the bugs a team is subscribed to. This required an API call which would export all the source packages subscriptions of a team. Bug #281443 and Bug #331039 document other needs for this API call.

Proposed fix:
The method for searching a team's subscriptions is already present in lib/lp/registry/model/person.py as Person.getBugSubscriberPackages(). This branch just exports this method in the API.

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) wrote :

Hi Kamran,

Thanks for making this change. Unfortunately before changes can be landed in Launchpad they must have tests to cover them. With your changes, the tests suite will at the moment almost certainly fail. You need to alter the existing tests to cover this change.

I haven't had time to run the whole test suite to check which tests fail, but you'll at least need to fix the tests in lib/lp/registry/stories/webservice/xx-person.txt (you can find out where the failures will be by running bin/test -cvvt xx-person from the root of your LP branch).

I'd be happy to help you with fixing the tests, just ping me in #launchpad-dev on Freenode and if I'm around I'll help you out.

review: Needs Fixing (code)
Revision history for this message
Kamran Riaz Khan (inspirated) wrote :

Hi Graham,

Thanks for taking time out to review. Here are the results for person test suite:

$ bin/test -cvvt xx-person.txtRunning tests at level 1
Running canonical.testing.layers.PageTestLayer tests:
  Set up canonical.testing.layers.BaseLayer in 0.082 seconds.
  Set up canonical.testing.layers.DatabaseLayer in 1 minutes 3.481 seconds.
  Set up canonical.testing.layers.LibrarianLayer in 22.484 seconds.
  Set up canonical.testing.layers.MemcachedLayer in 0.308 seconds.
  Set up canonical.testing.layers.LaunchpadLayer in 0.000 seconds.
  Set up canonical.testing.layers.FunctionalLayer in 11.257 seconds.
  Set up canonical.testing.layers.LaunchpadFunctionalLayer in 0.000 seconds.
  Set up canonical.testing.layers.GoogleServiceLayer in 5.759 seconds.
  Set up canonical.testing.layers.PageTestLayer in 0.012 seconds.
  Running:
 lib/lp/registry/tests/../stories/webservice/xx-person.txt
  Ran 52 tests with 0 failures and 0 errors in 1 minutes 12.426 seconds.
Tearing down left over layers:
  Tear down canonical.testing.layers.PageTestLayer in 0.000 seconds.
  Tear down canonical.testing.layers.LaunchpadFunctionalLayer in 0.000 seconds.
  Tear down canonical.testing.layers.LaunchpadLayer in 0.000 seconds.
  Tear down canonical.testing.layers.LibrarianLayer in 0.015 seconds.
  Tear down canonical.testing.layers.MemcachedLayer in 0.113 seconds.
  Tear down canonical.testing.layers.GoogleServiceLayer in 0.455 seconds.
  Tear down canonical.testing.layers.FunctionalLayer ... not supported
  Tear down canonical.testing.layers.DatabaseLayer in 0.190 seconds.
  Tear down canonical.testing.layers.BaseLayer in 0.000 seconds.

The tests do not introduce any regression (since the branch doesn't implement anything new in LP, it just exports a method that is already present).

Revision history for this message
Kamran Riaz Khan (inspirated) wrote :

Added new doctest in revision #11012.

$ bin/test -cvvt xx-person.txt
Running tests at level 1
Running canonical.testing.layers.PageTestLayer tests:
  Set up canonical.testing.layers.BaseLayer in 0.033 seconds.
  Set up canonical.testing.layers.DatabaseLayer in 1.283 seconds.
  Set up canonical.testing.layers.LibrarianLayer in 14.543 seconds.
  Set up canonical.testing.layers.MemcachedLayer in 0.186 seconds.
  Set up canonical.testing.layers.LaunchpadLayer in 0.000 seconds.
  Set up canonical.testing.layers.FunctionalLayer in 9.068 seconds.
  Set up canonical.testing.layers.LaunchpadFunctionalLayer in 0.000 seconds.
  Set up canonical.testing.layers.GoogleServiceLayer in 4.523 seconds.
  Set up canonical.testing.layers.PageTestLayer in 0.011 seconds.
  Running:
 lib/lp/registry/tests/../stories/webservice/xx-person.txt
  Ran 53 tests with 0 failures and 0 errors in 59.176 seconds.
Tearing down left over layers:
  Tear down canonical.testing.layers.PageTestLayer in 0.000 seconds.
  Tear down canonical.testing.layers.LaunchpadFunctionalLayer in 0.000 seconds.
  Tear down canonical.testing.layers.LaunchpadLayer in 0.000 seconds.
  Tear down canonical.testing.layers.LibrarianLayer in 0.006 seconds.
  Tear down canonical.testing.layers.MemcachedLayer in 0.103 seconds.
  Tear down canonical.testing.layers.GoogleServiceLayer in 0.312 seconds.
  Tear down canonical.testing.layers.FunctionalLayer ... not supported
  Tear down canonical.testing.layers.DatabaseLayer in 0.218 seconds.
  Tear down canonical.testing.layers.BaseLayer in 0.000 seconds.

Revision history for this message
Graham Binns (gmb) wrote :

The new test tests the method directly, not through the webservice; it should be tested using webservice.named_get() as used elsewhere in xx-person.txt

review: Needs Fixing (code)

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.