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