summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc/test_role_plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_xmlrpc/test_role_plugin.py')
-rw-r--r--tests/test_xmlrpc/test_role_plugin.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_role_plugin.py b/tests/test_xmlrpc/test_role_plugin.py
index 9c405cff..f871e268 100644
--- a/tests/test_xmlrpc/test_role_plugin.py
+++ b/tests/test_xmlrpc/test_role_plugin.py
@@ -33,6 +33,7 @@ role1 = u'test-role-1'
role1_dn = DN(('cn',role1),api.env.container_rolegroup,
api.env.basedn)
renamedrole1 = u'test-role'
+invalidrole1 = u' whitespace '
role2 = u'test-role-2'
role2_dn = DN(('cn',role2),api.env.container_rolegroup,
@@ -101,6 +102,15 @@ class test_role(Declarative):
dict(
+ desc='Create invalid %r' % invalidrole1,
+ command=('role_add', [invalidrole1],
+ dict(description=u'role desc 1')
+ ),
+ expected=errors.ValidationError(name='cn', error='Leading and trailing spaces are not allowed'),
+ ),
+
+
+ dict(
desc='Create %r' % role1,
command=('role_add', [role1],
dict(description=u'role desc 1')