Merge lp:~sinzui/launchpad/packagebugs-search-0 into lp:launchpad
Status: | Merged |
---|---|
Merged at revision: | 12384 |
Proposed branch: | lp:~sinzui/launchpad/packagebugs-search-0 |
Merge into: | lp:launchpad |
Diff against target: |
91 lines (+72/-2) 2 files modified
lib/lp/bugs/browser/tests/test_person_bugs.py (+70/-0) lib/lp/registry/browser/person.py (+2/-2) |
To merge this branch: | bzr merge lp:~sinzui/launchpad/packagebugs-search-0 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Henning Eggers (community) | code | Approve | |
Review via email: mp+49479@code.launchpad.net |
Description of the change
packagebugs+search must handle non-existant package names.
Launchpad bug: https:/
Pre-
Test command: ./bin/test -vv \
-t TestBugSubscrib
field.sourcepac
when you change the URL manually; It should raise an UnexpectedFormData.
This rule seemed odd. I assumed the view could recover and tell the user to
search with valid information. It is not possible though to select
a distribution or source package name from the form; +packagebugs-search
is dependent on the information setup in the links on other Launchpad pages.
This error happens when users hack the URLs found in those pages.
-------
RULES
* Update BugSubscriberPa
handle the case where the input is invalid. The code checks both the
distro and package widgets for hasInput() and getInputValue(). It
should check hasValidInput() /before/ getInputValue() or maybe just
that.
QA
* Visit https:/
* Verify the page reports a UnexpectedFormData error page.
LINT
lib/
lib/
IMPLEMENTATION
Added unittests to verify the documented behaviour. Added two new tests
for unknown distribution or source package name. hasValidInput() fixed the
issue. I discovered getInputValue() was needed to support the missing case,
but hasInput() was not not needed to support the use cases, so I removed it.
lib/
lib/
I think make_form should be called _makeForm to comply with PEP8.
Other than that I find this a nice little fix. Thank you!