Example #1
0
 def test_integration_custom_user(self):
     self.login(EmailUser)
     self.assertTrue(SudoForm(self.user, {"password": "******"}).is_valid())
Example #2
0
 def test_clean_password_valid_password(self):
     password = "******"
     self.assertEqual(
         SudoForm(self.user, {
             "password": password
         }).clean_password(), password)
Example #3
0
 def test_clean_password_secondary_auth_valid_password(self):
     password = "******"
     self.assertEqual(
         SudoForm(self.user, {
             "password": password
         }).clean_password(), password)
Example #4
0
 def test_integration_secondary_auth_valid_password(self):
     self.assertTrue(SudoForm(self.user, {"password": "******"}).is_valid())
Example #5
0
 def test_clean_password_invalid_password(self):
     with self.assertRaises(ValidationError):
         SudoForm(self.user, {"password": "******"}).clean_password()
Example #6
0
 def test_integration_invalid_password(self):
     self.assertFalse(SudoForm(self.user, {"password": "******"}).is_valid())
Example #7
0
 def test_integration_valid_password(self):
     self.assertTrue(SudoForm(self.user, {"password": "******"}).is_valid())
Example #8
0
 def test_integration_empty(self):
     self.assertFalse(SudoForm(self.user).is_valid())
Example #9
0
 def test_clean_password_secondary_auth_valid_password(self):
     password = '******'
     self.assertEqual(
         SudoForm(self.user, {'password': password}).clean_password(),
         password
     )
Example #10
0
 def test_clean_password_valid_password(self):
     password = '******'
     self.assertEqual(
         SudoForm(self.user, {'password': password}).clean_password(),
         password
     )
Example #11
0
 def test_integration_valid_password(self):
     self.assertTrue(
         SudoForm(self.user, {'password': '******'}).is_valid()
     )
Example #12
0
 def test_integration_invalid_password(self):
     self.assertFalse(
         SudoForm(self.user, {'password': '******'}).is_valid()
     )