mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
xmlrpc_test: Expect bytes rather than strings for binary attributes
The attributes krbextradata, krbprincipalkey, and userpassword contain binary data. Part of the work for: https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
parent
890f83b0bb
commit
095d0cb7af
@ -75,8 +75,8 @@ options_def = OrderedDict([
|
||||
('random password', {u'random': True}),
|
||||
])
|
||||
|
||||
options_ok = options_def.values()
|
||||
options_ids = options_def.keys()
|
||||
options_ok = list(options_def.values())
|
||||
options_ids = list(options_def.keys())
|
||||
|
||||
|
||||
@pytest.fixture(scope='class')
|
||||
|
@ -35,7 +35,7 @@ from ipatests.util import (
|
||||
assert_deepequal, assert_equal, assert_not_equal, raises)
|
||||
from ipatests.test_xmlrpc.xmlrpc_test import (
|
||||
XMLRPC_test, fuzzy_digits, fuzzy_uuid, fuzzy_password,
|
||||
fuzzy_string, fuzzy_dergeneralizedtime, add_sid, add_oc, raises_exact)
|
||||
Fuzzy, fuzzy_dergeneralizedtime, add_sid, add_oc, raises_exact)
|
||||
from ipapython.dn import DN
|
||||
|
||||
from ipatests.test_xmlrpc.tracker.base import Tracker
|
||||
@ -483,7 +483,7 @@ class TestCreate(XMLRPC_test):
|
||||
testuser.attrs.update(
|
||||
randompassword=fuzzy_password,
|
||||
has_keytab=True, has_password=True,
|
||||
krbextradata=[fuzzy_string],
|
||||
krbextradata=[Fuzzy(type=bytes)],
|
||||
krbpasswordexpiration=[fuzzy_dergeneralizedtime],
|
||||
krblastpwdchange=[fuzzy_dergeneralizedtime]
|
||||
)
|
||||
|
@ -9,7 +9,7 @@ from ipalib import api, errors
|
||||
from ipatests.test_xmlrpc.tracker.base import Tracker
|
||||
from ipatests.test_xmlrpc import objectclasses
|
||||
from ipatests.test_xmlrpc.xmlrpc_test import (
|
||||
fuzzy_string, fuzzy_dergeneralizedtime, raises_exact)
|
||||
Fuzzy, fuzzy_string, fuzzy_dergeneralizedtime, raises_exact)
|
||||
|
||||
from ipatests.util import assert_deepequal
|
||||
from ipapython.dn import DN
|
||||
@ -136,12 +136,12 @@ class StageUserTracker(Tracker):
|
||||
self.attrs[u'sshpubkeyfp'] = [sshpubkeyfp]
|
||||
self.attrs[key] = [self.kwargs[key]]
|
||||
elif key == u'random' or key == u'userpassword':
|
||||
self.attrs[u'krbextradata'] = [fuzzy_string]
|
||||
self.attrs[u'krbextradata'] = [Fuzzy(type=bytes)]
|
||||
self.attrs[u'krbpasswordexpiration'] = [
|
||||
fuzzy_dergeneralizedtime]
|
||||
self.attrs[u'krblastpwdchange'] = [fuzzy_dergeneralizedtime]
|
||||
self.attrs[u'krbprincipalkey'] = [fuzzy_string]
|
||||
self.attrs[u'userpassword'] = [fuzzy_string]
|
||||
self.attrs[u'krbprincipalkey'] = [Fuzzy(type=bytes)]
|
||||
self.attrs[u'userpassword'] = [Fuzzy(type=bytes)]
|
||||
self.attrs[u'has_keytab'] = True
|
||||
self.attrs[u'has_password'] = True
|
||||
if key == u'random':
|
||||
|
Loading…
Reference in New Issue
Block a user