From 6aa0b57440ee83ef771c23c5bf81a5edc26e2e67 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Mon, 1 Aug 2011 16:41:28 +0200 Subject: Fix automountkey-mod Fix automountkey-mod so that automountkey attribute is correctly updated. Add this test case to the unit tests. Make automountkey required for automountkey-mod, otherwise it would cause internal server error. Make --newinfo optional so that automountkey may be just renamed without changing its info attribute. https://fedorahosted.org/freeipa/ticket/1528 --- tests/test_xmlrpc/test_automount_plugin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/test_xmlrpc') diff --git a/tests/test_xmlrpc/test_automount_plugin.py b/tests/test_xmlrpc/test_automount_plugin.py index 0face2ef0..cfea61270 100644 --- a/tests/test_xmlrpc/test_automount_plugin.py +++ b/tests/test_xmlrpc/test_automount_plugin.py @@ -34,6 +34,7 @@ class test_automount(XMLRPC_test): locname = u'testlocation' mapname = u'testmap' keyname = u'testkey' + keyname_rename = u'testkey_rename' keyname2 = u'testkey2' description = u'description of map' info = u'ro' @@ -127,9 +128,11 @@ class test_automount(XMLRPC_test): Test the `xmlrpc.automountkey_mod` method. """ self.key_kw['newautomountinformation'] = self.newinfo + self.key_kw['rename'] = self.keyname_rename res = api.Command['automountkey_mod'](self.locname, self.mapname, **self.key_kw)['result'] assert res - assert_attr_equal(res, 'automountinformation', 'rw') + assert_attr_equal(res, 'automountinformation', self.newinfo) + assert_attr_equal(res, 'automountkey', self.keyname_rename) def test_a_automountmap_mod(self): """ @@ -144,7 +147,7 @@ class test_automount(XMLRPC_test): """ Test the `xmlrpc.automountkey_del` method. """ - delkey_kw={'automountkey': self.keyname, 'automountinformation' : self.newinfo, 'raw': True} + delkey_kw={'automountkey': self.keyname_rename, 'automountinformation' : self.newinfo, 'raw': True} res = api.Command['automountkey_del'](self.locname, self.mapname, **delkey_kw)['result'] assert res assert_attr_equal(res, 'failed', '') -- cgit