Merge lp:~matiasb/canonical-identity-provider/models-validation into lp:canonical-identity-provider/release
Proposed by
Matias Bordese
Status: | Merged |
---|---|
Approved by: | Natalia Bidart |
Approved revision: | no longer in the source branch. |
Merged at revision: | 556 |
Proposed branch: | lp:~matiasb/canonical-identity-provider/models-validation |
Merge into: | lp:canonical-identity-provider/release |
Diff against target: |
363 lines (+103/-71) 9 files modified
api/tests/test_handlers.py (+15/-2) api/v10/forms.py (+3/-19) api/v10/handlers.py (+12/-16) identityprovider/forms.py (+5/-23) identityprovider/models/account.py (+18/-0) identityprovider/models/emailaddress.py (+2/-1) identityprovider/tests/unit/test_validators.py (+26/-0) identityprovider/validators.py (+21/-0) webui/views/ui.py (+1/-10) |
To merge this branch: | bzr merge lp:~matiasb/canonical-identity-provider/models-validation |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Natalia Bidart (community) | Approve | ||
Review via email: mp+139547@code.launchpad.net |
Commit message
Refactored password and email validation when creating an account using (reusable) validators.
Description of the change
Refactored password and email validation when creating an account using (reusable) validators.
Updated forms/views requiring password validation.
Kept flexibility at the model level (by using set_password or create_account).
To post a comment you must log in.
Code looks good. This piece seems buggy to me, perhaps you can fix it and add a test for it as well?
108 - 'errors': [PASSWORD_ POLICY_ ERROR]
109 + 'errors': e.message
Also, could you please add a couple of more tests to PasswordPolicyV alidatorTestCas e?