-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bceac7d
commit b94fb78
Showing
1 changed file
with
3 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ | |
from openedx.core.djangoapps.user_api.tests.test_views import UserAPITestCase | ||
from openedx.core.djangoapps.user_api.accounts import EMAIL_MAX_LENGTH, EMAIL_MIN_LENGTH | ||
from openedx.core.djangoapps.user_authn.views.password_reset import ( | ||
SETTING_CHANGE_INITIATED, password_reset, LogistrationPasswordResetView, | ||
SETTING_CHANGE_INITIATED, PASSWORD_RESET_INITIATED, password_reset, LogistrationPasswordResetView, | ||
PasswordResetConfirmWrapper, password_change_request_handler) | ||
from openedx.core.djangolib.testing.utils import CacheIsolationTestCase | ||
from common.djangoapps.student.tests.factories import TEST_PASSWORD, UserFactory | ||
|
@@ -114,7 +114,7 @@ def test_user_bad_password_reset(self): | |
assert bad_pwd_resp.status_code == 200 | ||
obj = json.loads(bad_pwd_resp.content.decode('utf-8')) | ||
assert obj == {'success': True, 'value': "('registration/password_reset_done.html', [])"} | ||
self.assert_no_events_were_emitted() | ||
self.assert_event_emission_count(PASSWORD_RESET_INITIATED, 1) | ||
|
||
@patch( | ||
'openedx.core.djangoapps.user_authn.views.password_reset.render_to_string', | ||
|
@@ -134,7 +134,7 @@ def test_nonexist_email_password_reset(self): | |
assert bad_email_resp.status_code == 200 | ||
obj = json.loads(bad_email_resp.content.decode('utf-8')) | ||
assert obj == {'success': True, 'value': "('registration/password_reset_done.html', [])"} | ||
self.assert_no_events_were_emitted() | ||
self.assert_event_emission_count(PASSWORD_RESET_INITIATED, 1) | ||
|
||
@patch( | ||
'openedx.core.djangoapps.user_authn.views.password_reset.render_to_string', | ||
|
@@ -146,7 +146,6 @@ def test_password_reset_ratelimited_for_non_existing_user(self): | |
for non-existing user. | ||
""" | ||
self.assert_password_reset_ratelimitted('[email protected]', AnonymousUser()) | ||
self.assert_no_events_were_emitted() | ||
|
||
@patch( | ||
'openedx.core.djangoapps.user_authn.views.password_reset.render_to_string', | ||
|