def test_wrong_pwd(self): """ Wrong password is provided, authentication should fail. """ self.assertFalse(cc_ldap.auth_user(self.ldap_config, 'user2', 'wrong_password'))
def test_successful_auth(self): """ Successful user authentication. """ self.assertTrue(cc_ldap.auth_user(self.ldap_config, 'user2', 'user2pw'))
def test_empty_pwd(self): """ Try to authenticate with empty password. """ self.assertFalse(cc_ldap.auth_user(self.ldap_config, 'user2', ''))
def test_missing_pwd(self): """ Password is missing when auth_user function is called. """ self.assertFalse(cc_ldap.auth_user(self.ldap_config, 'user2'))