diff options
author | Petr Viktorin <pviktori@redhat.com> | 2014-06-06 14:21:16 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2014-06-13 14:15:06 +0200 |
commit | ba53299b98977308966039fad9518c79296bccbf (patch) | |
tree | d910c0cd399befe91f2f12889a79a4a1ca2501b0 /ipatests/test_xmlrpc/test_automount_plugin.py | |
parent | 91d3d4d7b2abf6441f8be033323d3849bbb57217 (diff) | |
download | freeipa-ba53299b98977308966039fad9518c79296bccbf.tar.gz freeipa-ba53299b98977308966039fad9518c79296bccbf.tar.xz freeipa-ba53299b98977308966039fad9518c79296bccbf.zip |
ipalib.frontend: Do API version check before converting arguments
This results in the proper message being shown if the client sends
an option the server doesn't have yet.
It also adds the check to commands that override run() but not __call__,
such as `ipa ping`, and to commands run on the server. Adjust tests
for these changes.
https://fedorahosted.org/freeipa/ticket/3963
Reviewed-By: Martin Kosek <mkosek@redhat.com>
Diffstat (limited to 'ipatests/test_xmlrpc/test_automount_plugin.py')
-rw-r--r-- | ipatests/test_xmlrpc/test_automount_plugin.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ipatests/test_xmlrpc/test_automount_plugin.py b/ipatests/test_xmlrpc/test_automount_plugin.py index 2eee80b1f..bd55c8583 100644 --- a/ipatests/test_xmlrpc/test_automount_plugin.py +++ b/ipatests/test_xmlrpc/test_automount_plugin.py @@ -51,7 +51,7 @@ class AutomountTest(XMLRPC_test): mock_ui = MockTextui() command = api.Command['automountlocation_tofiles'] - command.output_for_cli(mock_ui, res, self.locname) + command.output_for_cli(mock_ui, res, self.locname, version=u'2.88') expected_output = self.tofiles_output assert_deepequal(expected_output, u'\n'.join(mock_ui)) @@ -87,7 +87,8 @@ class AutomountTest(XMLRPC_test): # Feed the files to automountlocation_import & check master_file = u'%s/auto.master' % conf_directory automountlocation_import = api.Command['automountlocation_import'] - res = automountlocation_import(self.locname, master_file) + res = automountlocation_import(self.locname, master_file, + version=u'2.88') assert_deepequal(dict( result=dict( keys=lambda k: k, @@ -233,7 +234,8 @@ class test_automount(AutomountTest): """ Test the `automountlocation_tofiles` command. """ - res = api.Command['automountlocation_tofiles'](self.locname) + res = api.Command['automountlocation_tofiles'](self.locname, + version=u'2.88') assert_deepequal(dict( result=dict( keys={'auto.direct': ()}, |