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