summaryrefslogtreecommitdiffstats
path: root/tests/test_xmlrpc/test_pwpolicy.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-10-26 14:31:00 -0400
committerRob Crittenden <rcritten@redhat.com>2010-10-28 17:36:05 -0400
commit7486ead6c910d13ae4d7cbae6fae738ce2bf47eb (patch)
tree32ce7ca9a1407e5506e965f1c85b8b9b07047b18 /tests/test_xmlrpc/test_pwpolicy.py
parentc1dfb50ee9be266e3448ad53acd8a6464938c604 (diff)
downloadfreeipa-7486ead6c910d13ae4d7cbae6fae738ce2bf47eb.tar.gz
freeipa-7486ead6c910d13ae4d7cbae6fae738ce2bf47eb.tar.xz
freeipa-7486ead6c910d13ae4d7cbae6fae738ce2bf47eb.zip
Don't allow managed groups to have group password policy.
UPG cannot have members and we use memberOf in class of service to determine which policy to apply. ticket 160
Diffstat (limited to 'tests/test_xmlrpc/test_pwpolicy.py')
-rw-r--r--tests/test_xmlrpc/test_pwpolicy.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/test_xmlrpc/test_pwpolicy.py b/tests/test_xmlrpc/test_pwpolicy.py
index 94063c568..8a384ca56 100644
--- a/tests/test_xmlrpc/test_pwpolicy.py
+++ b/tests/test_xmlrpc/test_pwpolicy.py
@@ -149,7 +149,18 @@ class test_pwpolicy(XMLRPC_test):
entry = api.Command['pwpolicy_mod'](self.group, krbminpwdlife=50)['result']
assert_attr_equal(entry, 'krbminpwdlife', '50')
- def test_a_pwpolicy_del(self):
+ def test_a_pwpolicy_managed(self):
+ """
+ Test adding password policy to a managed group.
+ """
+ try:
+ entry = api.Command['pwpolicy_add'](self.user, krbminpwdlife=50, cospriority=2)['result']
+ except errors.ManagedPolicyError:
+ pass
+ else:
+ assert False
+
+ def test_b_pwpolicy_del(self):
"""
Test the `xmlrpc.pwpolicy_del` method.
"""