Test fixed modlist generation code

https://fedorahosted.org/freeipa/ticket/4138
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Petr Viktorin 2014-02-28 16:27:22 +01:00
parent c0c38ed314
commit fa5cbe7cb2
2 changed files with 17 additions and 1 deletions

View File

@ -278,6 +278,12 @@ class test_attr(Declarative):
),
),
dict(
desc='Try to "remove" empty location from %r' % user1,
command=('user_mod', [user1], dict(l=None)),
expected=errors.EmptyModlist(),
),
dict(
desc='Lock %r using setattr' % user1,
command=(

View File

@ -270,6 +270,16 @@ class test_permission_negative(Declarative):
'(e.g. target, targetfilter, attrs)'),
),
dict(
desc='Try to "remove" empty memberof from %r' % permission1,
command=(
'permission_mod', [permission1], dict(
memberof=None,
)
),
expected=errors.EmptyModlist(),
),
dict(
desc='Try to remove targetfilter and memberof from %r' % permission1,
command=(
@ -285,7 +295,7 @@ class test_permission_negative(Declarative):
),
dict(
desc='Try to rename %r to invalid invalid %r' % (
desc='Try to rename %r to invalid %r' % (
permission1, invalid_permission1),
command=('permission_mod', [permission1], dict(
rename=invalid_permission1,