예제 #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'],
     )
예제 #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'],
     )
예제 #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")
예제 #4
0
 def test_auth_fail_with_old_password(self):
     with self.assertRaises(InvalidCredentials):
         User.authenticate(self.username, self.password)
예제 #5
0
 def test_invalid_username_raises(self):
     with self.assertRaises(InvalidCredentials):
         User.authenticate(self.username + 'wrong', self.password)
예제 #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")
예제 #7
0
 def test_auth_fail_with_old_password(self):
     with self.assertRaises(InvalidCredentials):
         User.authenticate(self.username, self.password)
예제 #8
0
 def test_invalid_username_raises(self):
     with self.assertRaises(InvalidCredentials):
         User.authenticate(self.username + 'wrong', self.password)