Hi,

In the previous versions, version in the response was generated
as part of the process_keyword_arguments method. This is no longer true,
and so the explicit check for it should be removed.

Tomas
From 6f3b99589257711cbfa349cc6b21055b430a2d87 Mon Sep 17 00:00:00 2001
From: Tomas Babej <tba...@redhat.com>
Date: Tue, 21 Jul 2015 15:30:47 +0200
Subject: [PATCH] tests: Version is currently generated during command call

In the previous versions, version in the response was generated
as part of the process_keyword_arguments method. This is no longer true,
and so the explicit check for it should be removed.
---
 ipatests/test_cmdline/test_cli.py | 51 ++++++++++++---------------------------
 1 file changed, 16 insertions(+), 35 deletions(-)

diff --git a/ipatests/test_cmdline/test_cli.py b/ipatests/test_cmdline/test_cli.py
index 1f7775ea85fd301f71d8e028f0f8efc49346700f..1a97608a4ce4f74da25b4bcb6a90384e1a3aa4e4 100644
--- a/ipatests/test_cmdline/test_cli.py
+++ b/ipatests/test_cmdline/test_cli.py
@@ -42,8 +42,7 @@ class TestCLIParsing(object):
         sys.stdin = old_stdin
 
     def test_ping(self):
-        self.check_command('ping', 'ping',
-            version=API_VERSION)
+        self.check_command('ping', 'ping')
 
     def test_user_show(self):
         self.check_command('user-show admin', 'user_show',
@@ -51,8 +50,7 @@ class TestCLIParsing(object):
             rights=False,
             no_members=False,
             raw=False,
-            all=False,
-            version=API_VERSION)
+            all=False)
 
     def test_user_show_underscore(self):
         self.check_command('user_show admin', 'user_show',
@@ -60,8 +58,7 @@ class TestCLIParsing(object):
             rights=False,
             no_members=False,
             raw=False,
-            all=False,
-            version=API_VERSION)
+            all=False)
 
     def test_group_add(self):
         self.check_command('group-add tgroup1 --desc="Test group"',
@@ -72,8 +69,7 @@ class TestCLIParsing(object):
             external=False,
             no_members=False,
             raw=False,
-            all=False,
-            version=API_VERSION)
+            all=False)
 
     def test_sudocmdgroup_add_member(self):
         # Test CSV splitting is not done
@@ -85,8 +81,7 @@ class TestCLIParsing(object):
             sudocmd=[u'ab,c', u'd'],
             no_members=False,
             raw=False,
-            all=False,
-            version=API_VERSION)
+            all=False)
 
     def test_group_add_nonposix(self):
         self.check_command('group-add tgroup1 --desc="Test group" --nonposix',
@@ -97,8 +92,7 @@ class TestCLIParsing(object):
             external=False,
             no_members=False,
             raw=False,
-            all=False,
-            version=API_VERSION)
+            all=False)
 
     def test_group_add_gid(self):
         self.check_command('group-add tgroup1 --desc="Test group" --gid=1234',
@@ -110,8 +104,7 @@ class TestCLIParsing(object):
             external=False,
             no_members=False,
             raw=False,
-            all=False,
-            version=API_VERSION)
+            all=False)
 
     def test_group_add_interactive(self):
         with self.fake_stdin('Test group\n'):
@@ -121,8 +114,7 @@ class TestCLIParsing(object):
                 external=False,
                 no_members=False,
                 raw=False,
-                all=False,
-                version=API_VERSION)
+                all=False)
 
     def test_dnsrecord_add(self):
         self.check_command('dnsrecord-add test-example.com ns --a-rec=1.2.3.4',
@@ -133,8 +125,7 @@ class TestCLIParsing(object):
             structured=False,
             force=False,
             raw=False,
-            all=False,
-            version=API_VERSION)
+            all=False)
 
     def test_dnsrecord_del_all(self):
         try:
@@ -151,16 +142,14 @@ class TestCLIParsing(object):
                     dnszoneidnsname=u'test-example.com',
                     idnsname=u'ns',
                     del_all=True,
-                    structured=False,
-                    version=API_VERSION)
+                    structured=False)
             with self.fake_stdin('YeS\n'):
                 self.check_command('dnsrecord_del test-example.com ns',
                     'dnsrecord_del',
                     dnszoneidnsname=u'test-example.com',
                     idnsname=u'ns',
                     del_all=True,
-                    structured=False,
-                    version=API_VERSION)
+                    structured=False)
         finally:
             self.run_command('dnszone_del', idnsname=u'test-example.com')
 
@@ -183,8 +172,7 @@ class TestCLIParsing(object):
                     idnsname=u'ns',
                     del_all=False,
                     sshfprecord=records,
-                    structured=False,
-                    version=API_VERSION)
+                    structured=False)
         finally:
             self.run_command('dnszone_del', idnsname=u'test-example.com')
 
@@ -202,8 +190,7 @@ class TestCLIParsing(object):
                 structured=False,
                 raw=False,
                 all=False,
-                force=False,
-                version=API_VERSION)
+                force=False)
 
         # NOTE: when a DNS record part is passed via command line, it is not
         # converted to its base type when transfered via wire
@@ -219,8 +206,7 @@ class TestCLIParsing(object):
                 structured=False,
                 raw=False,
                 all=False,
-                force=False,
-                version=API_VERSION)
+                force=False)
 
         with self.fake_stdin(sshfp_parts[2]):
             self.check_command('dnsrecord-add test-example.com sshfp ' \
@@ -234,8 +220,7 @@ class TestCLIParsing(object):
                 structured=False,
                 raw=False,
                 all=False,
-                force=False,
-                version=API_VERSION)
+                force=False)
 
     def test_dnsrecord_del_comma(self):
         try:
@@ -257,8 +242,7 @@ class TestCLIParsing(object):
                     idnsname=u'test',
                     del_all=False,
                     txtrecord=[u'"A pretty little problem," said Holmes.'],
-                    structured=False,
-                    version=API_VERSION)
+                    structured=False)
         finally:
             self.run_command('dnszone_del', idnsname=u'test-example.com')
 
@@ -278,7 +262,6 @@ class TestCLIParsing(object):
                     ipasecondarybaserid=500000,
                     all=False,
                     raw=False,
-                    version=API_VERSION
                 )
 
         def test_with_command_line_options():
@@ -293,7 +276,6 @@ class TestCLIParsing(object):
                 ipasecondarybaserid=u'500000',
                 all=False,
                 raw=False,
-                version=API_VERSION
             )
 
         def test_without_options():
@@ -305,7 +287,6 @@ class TestCLIParsing(object):
                 ipaidrangesize=u'1',
                 all=False,
                 raw=False,
-                version=API_VERSION
             )
 
         adtrust_dn = 'cn=ADTRUST,cn=%s,cn=masters,cn=ipa,cn=etc,%s' % \
-- 
2.1.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to