def test_00011_emails_are_valid(self): """ Verify the different scenarios when checking if any email addr from DN or SAN extension does not appear in ldap entry. """ from ipaserver.plugins.cert import _emails_are_valid email_addrs = [u'*****@*****.**'] result = _emails_are_valid(email_addrs, [u'*****@*****.**']) assert True == result, result email_addrs = [u'*****@*****.**'] result = _emails_are_valid(email_addrs, [u'*****@*****.**', u'*****@*****.**']) assert True == result, result result = _emails_are_valid([], [u'*****@*****.**']) assert True == result, result email_addrs = [u'invalidEmailAddress'] result = _emails_are_valid(email_addrs, []) assert False == result, result