diff options
Diffstat (limited to 'tests/test_xmlrpc/test_netgroup_plugin.py')
-rw-r--r-- | tests/test_xmlrpc/test_netgroup_plugin.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_netgroup_plugin.py b/tests/test_xmlrpc/test_netgroup_plugin.py index 9194b5492..1c6b94bd2 100644 --- a/tests/test_xmlrpc/test_netgroup_plugin.py +++ b/tests/test_xmlrpc/test_netgroup_plugin.py @@ -56,6 +56,8 @@ user2 = u'pexample' group1 = u'testgroup' +invalidnetgroup1=u'+badnetgroup' + class test_netgroup(Declarative): """ Test the `netgroup` plugin. @@ -97,6 +99,13 @@ class test_netgroup(Declarative): dict( + desc='Test an invalid netgroup name %r' % invalidnetgroup1, + command=('netgroup_add', [invalidnetgroup1], dict(description=u'Test')), + expected=errors.ValidationError(name='cn', error='may only include letters, numbers, _, - and .'), + ), + + + dict( desc='Create %r' % netgroup1, command=('netgroup_add', [netgroup1], dict(description=u'Test netgroup 1') |