Rename class cli to Cli 69/22769/1
authorYujun Zhang <zhang.yujunz@zte.com.cn>
Fri, 7 Oct 2016 05:39:58 +0000 (13:39 +0800)
committerYujun Zhang <zhang.yujunz@zte.com.cn>
Fri, 7 Oct 2016 05:40:06 +0000 (13:40 +0800)
class name should be CamelCase

Change-Id: I3b68b14483a475499baf832eb1af93ecca171b14
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
func/cli.py
qtip.py
tests/cli_test.py

index 833437d..7d52620 100644 (file)
@@ -13,7 +13,7 @@ import args_handler
 import argparse
 
 
-class cli:
+class Cli:
 
     @staticmethod
     def _parse_args(args):
diff --git a/qtip.py b/qtip.py
index f95bb70..094483f 100644 (file)
--- a/qtip.py
+++ b/qtip.py
@@ -6,13 +6,13 @@
 # which accompanies this distribution, and is available at\r
 # http://www.apache.org/licenses/LICENSE-2.0\r
 ##############################################################################\r
-from func.cli import cli\r
+from func.cli import Cli\r
 import os\r
 \r
 \r
 def main():\r
     os.system('./data/file_permission.sh')\r
-    cli()\r
+    Cli()\r
 #    os.system('cd data/ref_results && python compute_suite.py')\r
 #    os.system('cd data/ref_results && python storage_suite.py')\r
 #    os.system('cd data/ref_results && python network_suite.py')\r
index fe05327..12d0abb 100644 (file)
@@ -1,7 +1,7 @@
 import pytest
 import mock
 import os
-from func.cli import cli
+from func.cli import Cli
 
 
 class TestClass:
@@ -19,7 +19,7 @@ class TestClass:
         k = mock.patch.dict(os.environ, {'INSTALLER_TYPE': 'fuel', 'PWD': '/home'})
         with pytest.raises(SystemExit):
             k.start()
-            cli(test_input)
+            Cli(test_input)
             k.stop()
         resout, reserr = capfd.readouterr()
         assert expected in resout
@@ -35,7 +35,7 @@ class TestClass:
     def test_cli_successful(self, mock_args_handler, test_input, expected):
         k = mock.patch.dict(os.environ, {'INSTALLER_TYPE': 'fuel', 'PWD': '/home'})
         k.start()
-        cli(test_input)
+        Cli(test_input)
         k.stop()
         call_list = map(lambda x: mock_args_handler.call_args_list[x][0], range(len(expected)))
         assert sorted(call_list) == sorted(expected)