'Verifies the username and password agains a LDAP server
:param pwd: The password
:param user: The username
:return: AssertionError if the LDAP verification failed.'

def _verify(self, pwd, user):

    _dn = (self.dn_pattern % user)
    try:
        self.ldap.simple_bind_s(_dn, pwd)
    except Exception:
        raise AssertionError()
