Exemplo n.º 1
0
 def test_password_form_invalid(self):
     """
     Test password strength form (invalid)
     """
     form = ValidatingPasswordChangeForm(user=self.user, data={
         'new_password1': '123456',
         'new_password2': '123456',
         'old_password': '******'
     })
     self.assertFalse(form.is_valid())
Exemplo n.º 2
0
 def test_password_form_valid(self):
     """
     Test password form (valid)
     """
     form = ValidatingPasswordChangeForm(user=self.user, data={
         'new_password1': 'qweE58mc4',
         'new_password2': 'qweE58mc4',
         'old_password': '******'
     })
     self.assertTrue(form.is_valid())