mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix invalid issuer in unit tests
Fix several test failures when issuer does not match the one generated by make-testcert (CN=Certificate Authority,O=<realm>). https://fedorahosted.org/freeipa/ticket/1527
This commit is contained in:
committed by
Rob Crittenden
parent
1b09ca53a2
commit
18aa73e06e
@@ -27,6 +27,7 @@ import nose
|
||||
from tests.util import assert_deepequal, Fuzzy
|
||||
from ipalib import api, request
|
||||
from ipalib import errors
|
||||
from ipalib.x509 import valid_issuer
|
||||
|
||||
|
||||
# Matches a gidnumber like '1391016742'
|
||||
@@ -50,6 +51,8 @@ fuzzy_hash = Fuzzy('^([a-f0-9][a-f0-9]:)+[a-f0-9][a-f0-9]$', type=basestring)
|
||||
# Matches a date, like Tue Apr 26 17:45:35 2016 UTC
|
||||
fuzzy_date = Fuzzy('^[a-zA-Z]{3} [a-zA-Z]{3} \d{2} \d{2}:\d{2}:\d{2} \d{4} UTC$')
|
||||
|
||||
fuzzy_issuer = Fuzzy(type=basestring, test=lambda issuer: valid_issuer(issuer, api.env.realm))
|
||||
|
||||
try:
|
||||
if not api.Backend.xmlclient.isconnected():
|
||||
api.Backend.xmlclient.connect(fallback=False)
|
||||
|
||||
Reference in New Issue
Block a user