mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix unit tests to work with new comma-support, validation requirements
This commit is contained in:
parent
cfafc415f3
commit
a672483118
@ -424,7 +424,7 @@ class test_hbac(XMLRPC_test):
|
|||||||
"""
|
"""
|
||||||
api.Command['hbacrule_mod'](self.rule_name, usercategory=u'all')
|
api.Command['hbacrule_mod'](self.rule_name, usercategory=u'all')
|
||||||
try:
|
try:
|
||||||
api.Command['hbacrule_add_user'](self.rule_name, users='admin')
|
api.Command['hbacrule_add_user'](self.rule_name, users=u'admin')
|
||||||
finally:
|
finally:
|
||||||
api.Command['hbacrule_mod'](self.rule_name, usercategory=u'')
|
api.Command['hbacrule_mod'](self.rule_name, usercategory=u'')
|
||||||
|
|
||||||
@ -433,11 +433,11 @@ class test_hbac(XMLRPC_test):
|
|||||||
"""
|
"""
|
||||||
Test setting usercat='all' in an HBAC rule when there are users
|
Test setting usercat='all' in an HBAC rule when there are users
|
||||||
"""
|
"""
|
||||||
api.Command['hbacrule_add_user'](self.rule_name, user='admin')
|
api.Command['hbacrule_add_user'](self.rule_name, user=u'admin')
|
||||||
try:
|
try:
|
||||||
api.Command['hbacrule_mod'](self.rule_name, usercategory=u'all')
|
api.Command['hbacrule_mod'](self.rule_name, usercategory=u'all')
|
||||||
finally:
|
finally:
|
||||||
api.Command['hbacrule_remove_user'](self.rule_name, user='admin')
|
api.Command['hbacrule_remove_user'](self.rule_name, user=u'admin')
|
||||||
|
|
||||||
@raises(errors.MutuallyExclusiveError)
|
@raises(errors.MutuallyExclusiveError)
|
||||||
def test_h_hbacrule_exclusivehost(self):
|
def test_h_hbacrule_exclusivehost(self):
|
||||||
|
@ -661,8 +661,8 @@ class test_permission(Declarative):
|
|||||||
command=(
|
command=(
|
||||||
'permission_add', [permission1], dict(
|
'permission_add', [permission1], dict(
|
||||||
type=u'hostgroup',
|
type=u'hostgroup',
|
||||||
permissions=u'add,delete,write',
|
permissions=[u'add', u'delete', u'write'],
|
||||||
attrs=u'businessCategory,owner,description',
|
attrs=[u'businessCategory', u'owner', u'description'],
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
expected=dict(
|
expected=dict(
|
||||||
|
@ -271,7 +271,7 @@ class test_service(Declarative):
|
|||||||
|
|
||||||
dict(
|
dict(
|
||||||
desc='Add non-existent host to %r' % service1,
|
desc='Add non-existent host to %r' % service1,
|
||||||
command=('service_add_host', [service1], dict(host='notfound')),
|
command=('service_add_host', [service1], dict(host=u'notfound')),
|
||||||
expected=dict(
|
expected=dict(
|
||||||
failed=dict(managedby=dict(host=[(u'notfound', u'no such entry')])),
|
failed=dict(managedby=dict(host=[(u'notfound', u'no such entry')])),
|
||||||
completed=0,
|
completed=0,
|
||||||
@ -286,7 +286,7 @@ class test_service(Declarative):
|
|||||||
|
|
||||||
dict(
|
dict(
|
||||||
desc='Remove non-existent host from %r' % service1,
|
desc='Remove non-existent host from %r' % service1,
|
||||||
command=('service_remove_host', [service1], dict(host='notfound')),
|
command=('service_remove_host', [service1], dict(host=u'notfound')),
|
||||||
expected=dict(
|
expected=dict(
|
||||||
failed=dict(managedby=dict(host=[(u'notfound', u'This entry is not a member')])),
|
failed=dict(managedby=dict(host=[(u'notfound', u'This entry is not a member')])),
|
||||||
completed=0,
|
completed=0,
|
||||||
|
Loading…
Reference in New Issue
Block a user