Merge lp://qastaging/~sinzui/launchpad/deactivate-deactivated-account-0 into lp://qastaging/launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Robert Collins | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 11337 | ||||
Proposed branch: | lp://qastaging/~sinzui/launchpad/deactivate-deactivated-account-0 | ||||
Merge into: | lp://qastaging/launchpad | ||||
Diff against target: |
84 lines (+39/-7) 2 files modified
lib/lp/registry/browser/person.py (+7/-2) lib/lp/registry/browser/tests/test_person_view.py (+32/-5) |
||||
To merge this branch: | bzr merge lp://qastaging/~sinzui/launchpad/deactivate-deactivated-account-0 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
Review via email: mp+32264@code.qastaging.launchpad.net |
Description of the change
This is my branch to fix the oops caused by users trying to deactivate their
already deactivated account.
lp:~sinzui/launchpad/deactivate-deactivated-account-0
Diff size: 85
Launchpad bug:
https:/
Test command: ./bin/test -vv -t TestPersonDeact
Pre-
Target release: 10.06
Do not let user try to deactivate their already deactivated account
-------
This oops happens when users are hacking the URL or using their browser
history to resubmit the form that deactivated their account in a false
hope that it doing it again will remove the page. The view must handle
this situation
Rules
-----
* The view must verify the person is active before preceding to the
deactivate step.
QA
--
* On staging create a user
* Visit the deactivate user page and open another tab to the page.
* Deactivate the user
* In the other tab deactivate the user
* Verify you see a message explaining that the user is already deactivated.
Lint
----
Linting changed files:
lib/lp/
lib/lp/
Test
----
* lib/lp/
* Added a basic test to verify that the TestPersonDeact
works.
* Added a test to show that an error is returned if the user is not
Active.
Implementation
--------------
* lib/lp/
* Added a validate method to TestPersonDeact
non-active users are not deactivated.
Hi, this looks ok to me.
Nothing to do with your patch per se - I have a question about the initialised_ view - I presume that
test technology being used: create_
that lets you get in under the publishing machinery?
That means that things setup by publications - like oops handling etc
- won't be notified properly? So I wonder what the advantages of it
are for testing, as it seems to diverge from production quite sharply.
-Rob