Merge lp:~ralsina/ubuntu-sso-client/error_message_key into lp:ubuntu-sso-client
Proposed by
Roberto Alsina
Status: | Merged |
---|---|
Approved by: | Natalia Bidart |
Approved revision: | 765 |
Merged at revision: | 760 |
Proposed branch: | lp:~ralsina/ubuntu-sso-client/error_message_key |
Merge into: | lp:ubuntu-sso-client |
Diff against target: |
237 lines (+143/-11) 2 files modified
ubuntu_sso/qt/controllers.py (+32/-5) ubuntu_sso/qt/tests/test_windows.py (+111/-6) |
To merge this branch: | bzr merge lp:~ralsina/ubuntu-sso-client/error_message_key |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Natalia Bidart (community) | Approve | ||
Review via email: mp+71966@code.launchpad.net |
Commit message
Added a function to convert errordicts to strings, used that function to make on_login_error work better.
Description of the change
Added a function to convert errordicts to strings:
* Based on the one in the gtk implementation
* Made more robust (we are getting errordicts with "error_message" and no "message" and no "__all__")
* Made it more readable (IMHO)
* Done with TDD ;-)
I suspect that this version is an improvement over the gtk one and both should be moved to a "neutral" place.
Used that function to make on_login_error work better.
To post a comment you must log in.
The branch looks great!
Only a couple of tests are missing:
- when both msg1 and msg2 are not None (for two cases: when msg2 is 'message' and when is 'error_message').
- when msg1 is not None (ie __all__ is present)
Can you please add those test cases? Thanks!