Merge lp://staging/~rockstar/launchpad/recipe-no-signer into lp://staging/launchpad

Proposed by Paul Hummer
Status: Merged
Merged at revision: 11258
Proposed branch: lp://staging/~rockstar/launchpad/recipe-no-signer
Merge into: lp://staging/launchpad
Diff against target: 153 lines (+55/-8)
5 files modified
lib/lp/soyuz/interfaces/sourcepackagerelease.py (+4/-2)
lib/lp/soyuz/model/sourcepackagerelease.py (+9/-1)
lib/lp/soyuz/templates/archive-index.pt (+1/-1)
lib/lp/soyuz/tests/test_sourcepackagerelease.py (+32/-0)
lib/lp/testing/factory.py (+9/-4)
To merge this branch: bzr merge lp://staging/~rockstar/launchpad/recipe-no-signer
Reviewer Review Type Date Requested Status
Tim Penhey (community) conditional Approve
Review via email: mp+31339@code.staging.launchpad.net

Description of the change

This branch just creates a SourcePackageRelease.uploader that not only knows about how to deal with source package uploads, but source package recipes. I created new unit tests for each uploader case that can happen as well. I also cleaned up some lint as a driveby, but it's still complaining about commas not following whitespace.

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Test case in lib/lp/soyuz/tests/test_sourcepackagerelease.py is missing a lot
of docstrings.

> def test_uploader_no_uploader(self):

You shouldn't test for equality to None, use assertIs instead.
    self.assertIs(None, spr.uploader)

Also don't split the lines if they don't need it.

> def test_uploader_dsc_package(self):

Instead of testing against spr.dscsigningkey.owner, just use 'owner' as you
created it in the test. It makes the test more obvious.

    self.assertEqual(owner, spr.uploader)

> def test_uploader_recipe(self):

Keep the assertEqual on one line.

Thanks for the other lint cleanup.

review: Approve (conditional)

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.