Forgot Password leak info about valid accounts

ECOM-4703
This commit is contained in:
Ahsan Ulhaq
2016-07-26 16:20:37 +05:00
parent c8f0e00ec8
commit 4c3f68cdc4
6 changed files with 43 additions and 23 deletions

View File

@@ -145,18 +145,15 @@ class LoginFromCombinedPageTest(UniqueCourseTest):
# Expect that we're shown a success message
self.assertIn("Password Reset Email Sent", self.login_page.wait_for_success())
def test_password_reset_failure(self):
def test_password_reset_no_user(self):
# Navigate to the password reset form
self.login_page.visit()
# User account does not exist
self.login_page.password_reset(email="nobody@nowhere.com")
# Expect that we're shown a failure message
self.assertIn(
"No user with the provided email address exists.",
self.login_page.wait_for_errors()
)
# Expect that we're shown a success message
self.assertIn("Password Reset Email Sent", self.login_page.wait_for_success())
def test_third_party_login(self):
"""