# 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
import pytest
import mock
import os
-from func.cli import cli
+from func.cli import Cli
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
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)