示例#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)