Beispiel #1
0
 def test_user_data_passed(self):
     user = User.authenticate(self.username, self.password)
     self.assert_user_data_passed(
         user=user,
         login=self.username,
         name=self.user_dict['gecos'],
     )
Beispiel #2
0
 def test_user_data_passed(self):
     user = User.authenticate(self.username, self.password)
     self.assert_user_data_passed(
         user=user,
         login=self.username,
         name=self.user_dict['gecos'],
     )
Beispiel #3
0
 def test_auth_succeeds_with_new_password(self):
     try:
         User.authenticate(self.username, self.new_password)
     except InvalidCredentials:
         self.fail("Authentication failed with new password")
Beispiel #4
0
 def test_auth_fail_with_old_password(self):
     with self.assertRaises(InvalidCredentials):
         User.authenticate(self.username, self.password)
Beispiel #5
0
 def test_invalid_username_raises(self):
     with self.assertRaises(InvalidCredentials):
         User.authenticate(self.username + 'wrong', self.password)
Beispiel #6
0
 def test_auth_succeeds_with_new_password(self):
     try:
         User.authenticate(self.username, self.new_password)
     except InvalidCredentials:
         self.fail("Authentication failed with new password")
Beispiel #7
0
 def test_auth_fail_with_old_password(self):
     with self.assertRaises(InvalidCredentials):
         User.authenticate(self.username, self.password)
Beispiel #8
0
 def test_invalid_username_raises(self):
     with self.assertRaises(InvalidCredentials):
         User.authenticate(self.username + 'wrong', self.password)