Merge lp://qastaging/~julian-edwards/launchpad/checkUpload-bug-608891 into lp://qastaging/launchpad
Status: | Merged |
---|---|
Approved by: | Māris Fogels |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11238 |
Proposed branch: | lp://qastaging/~julian-edwards/launchpad/checkUpload-bug-608891 |
Merge into: | lp://qastaging/launchpad |
Diff against target: |
83 lines (+68/-0) 2 files modified
lib/lp/soyuz/browser/tests/test_archive_webservice.py (+67/-0) lib/lp/soyuz/interfaces/archive.py (+1/-0) |
To merge this branch: | bzr merge lp://qastaging/~julian-edwards/launchpad/checkUpload-bug-608891 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Māris Fogels (community) | code | Approve | |
Review via email: mp+31041@code.qastaging.launchpad.net |
Description of the change
= Summary =
Fix bug 608891, prevent an OOPS when there should not be one.
== Proposed fix ==
There's a webservice_error() missing from a the CannotUploadToP
class, so when it gets raised it generates an OOPS instead of returning an
error to the client.
== Tests ==
I added a new unit test file
bin/test -cvv test_archive_
= Launchpad lint =
The lint checker blows on interface files with webservice exports. Ignore
this.
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
./lib/lp/
528: E301 expected 1 blank line, found 0
545: E202 whitespace before ')'
570: E501 line too long (81 characters)
572: E501 line too long (80 characters)
577: E501 line too long (81 characters)
580: E501 line too long (80 characters)
655: E301 expected 1 blank line, found 0
678: E301 expected 1 blank line, found 0
701: E301 expected 1 blank line, found 0
801: E301 expected 1 blank line, found 0
1138: E302 expected 2 blank lines, found 1
1435: E301 expected 1 blank line, found 2
1664: E303 too many blank lines (3)
521: Line exceeds 78 characters.
570: Line exceeds 78 characters.
572: Line exceeds 78 characters.
577: Line exceeds 78 characters.
580: Line exceeds 78 characters.
1449: Line exceeds 78 characters.
Hi Julian,
This code looks good. I have a few questions about the code, just trivial fixes:
• The copyright needs updating to 2010
• Does it matter if you explicitly call TestCaseWithFac tory.setUp( self), or should you use super()?
• An alternative but still elegant way to write _do_check() is to use a partial function to save the parameters: http:// docs.python. org/library/ functools. html#functools. partial
With those considerations, r=mars
Maris