Merge lp://staging/~gary/launchpad/bug553368 into lp://staging/launchpad
Status: | Merged |
---|---|
Approved by: | Gary Poster |
Approved revision: | no longer in the source branch. |
Merged at revision: | 13209 |
Proposed branch: | lp://staging/~gary/launchpad/bug553368 |
Merge into: | lp://staging/launchpad |
Diff against target: |
283 lines (+141/-9) 5 files modified
lib/canonical/launchpad/webapp/error.py (+20/-8) lib/canonical/launchpad/webapp/tests/test_login.py (+40/-1) lib/lp/app/browser/configure.zcml (+9/-0) lib/lp/app/templates/launchpad-discoveryfailure.pt (+19/-0) lib/lp/testing/fixture.py (+53/-0) |
To merge this branch: | bzr merge lp://staging/~gary/launchpad/bug553368 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
Brad Crittenden (community) | code | Approve | |
Review via email:
|
Commit message
[r=bac,lifeless][bug=553368] Make more friendly error page for when openid server is down; add view test fixture.
Description of the change
This branch provides a simple fix for the linked bug: an OpenID DiscoveryError returns a 503 and a hopefully helpful error page, but no OOPS is logged.
Writing a test for this was a bit tricky because I didn't want to use a monkeypatch, and because I wanted to show that the full reported error was squashed. I ended up with a test fixture for replacing one view with another in the Zope component registry, which seems to work pretty well. I suspect it has limited usefulness, but it is general, and was easy enough to factor it out as a fixture, so I did so.
lint:
./lib/canonical /launchpad/ webapp/ login.py
490: E302 expected 2 blank lines, found 1
This is for a function that has a comment in front of it; that apparently confuses our linter.
./lib/canonical /launchpad/ webapp/ tests/test_ login.py
626: E301 expected 1 blank line, found 0
627: E301 expected 1 blank line, found 0
This is for the inline class, which I need because I have to subclass the dynamically generated class. I could do "type" games instead if you wanted, but I thought an inline class was simpler and easier to understand.