From eed3a9fc0bf490bef2e1c7cc597db6063c11bcac Mon Sep 17 00:00:00 2001 From: "wu.zhihui" Date: Wed, 9 Nov 2016 09:38:08 +0800 Subject: Merge func to utils Local test is ok. JIRA: QTIP-131 Change-Id: I7009337903c7ded90dda47a05d6c1c95aa96815d Signed-off-by: wu.zhihui --- tests/args_handler_test.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/args_handler_test.py') diff --git a/tests/args_handler_test.py b/tests/args_handler_test.py index a5c2223f..625a42f5 100644 --- a/tests/args_handler_test.py +++ b/tests/args_handler_test.py @@ -8,7 +8,7 @@ ############################################################################## import pytest import mock -import func.args_handler +import utils.args_handler class TestClass: @@ -20,16 +20,16 @@ class TestClass: [('duration', 20), ('protocol', 'tcp'), ('bandwidthGbps', 10)], [("10.20.0.24", [None]), ("10.20.0.23", [None])], {}]) ]) - @mock.patch('func.args_handler.Env_setup.call_ping_test') - @mock.patch('func.args_handler.Env_setup.call_ssh_test') - @mock.patch('func.args_handler.Env_setup.update_ansible') - @mock.patch('func.args_handler.SpawnVM') - @mock.patch('func.args_handler.Driver.drive_bench') + @mock.patch('utils.args_handler.Env_setup.call_ping_test') + @mock.patch('utils.args_handler.Env_setup.call_ssh_test') + @mock.patch('utils.args_handler.Env_setup.update_ansible') + @mock.patch('utils.args_handler.SpawnVM') + @mock.patch('utils.args_handler.Driver.drive_bench') def test_prepare_and_run_benchmark_successful(self, mock_driver, mock_sqawn_vm, mock_env_setup_ping, mock_env_setup_ssh, mock_update_ansible, test_input, expected): mock_ips = mock.Mock(return_value=["10.20.0.23", "10.20.0.24"]) - func.args_handler.Env_setup.fetch_compute_ips = mock_ips - func.args_handler.prepare_and_run_benchmark(test_input[0], test_input[1], test_input[2]) + utils.args_handler.Env_setup.fetch_compute_ips = mock_ips + utils.args_handler.prepare_and_run_benchmark(test_input[0], test_input[1], test_input[2]) call = mock_driver.call_args call_args, call_kwargs = call assert sorted(map(sorted, call_args)) == sorted(map(sorted, expected)) -- cgit 1.2.3-korg