Exemple #1
0
 def test_validate_invalid_change_password_format(self):
     # Ensure invalid email format throws error.
     form = ChangePasswordForm(password='******', confirm='123')
     self.assertFalse(form.validate())
Exemple #2
0
 def test_validate_invalid_change_password(self):
     # Ensure passwords must match.
     form = ChangePasswordForm(password='******', confirm='unknown')
     self.assertFalse(form.validate())
Exemple #3
0
 def test_validate_success_change_password_form(self):
     # Ensure correct data validates.
     form = ChangePasswordForm(password='******', confirm='update')
     self.assertTrue(form.validate())
Exemple #4
0
 def test_check_invalid_change_password(self):
     """
     Tests that passwords must match when chaning password
     """
     form = ChangePasswordForm(password='******', confirm='unknown')
     self.assertFalse(form.validate())
Exemple #5
0
 def test_check_success_change_password(self):
     """
     Tests that correct data changes the password.
     """
     form = ChangePasswordForm(password='******', confirm='update')
     self.assertTrue(form.validate())
Exemple #6
0
 def test_check_invalid_change_password_format(self):
     """
     Tests that invalid password format throws error.
     """
     form = ChangePasswordForm(password='******', confirm='123')
     self.assertFalse(form.validate())