diff options
author | 2017-05-16 14:11:02 +0800 | |
---|---|---|
committer | 2017-05-16 14:11:02 +0800 | |
commit | 6cf01ef2b8cff0412640b6cc87112852afee9c87 (patch) | |
tree | bdf60cf4af20470ba07000e55fbb36d2c3a5270c /legacy/tests/args_handler_test.py | |
parent | 1089daee7bbf76a1686b6e1f4fee8dc79b5b7968 (diff) |
delete unuse code in directory legacy
Change-Id: I31427e8a59ea241e882f41222f211fffe709043f
Signed-off-by: zhihui wu <wu.zhihui1@zte.com.cn>
Diffstat (limited to 'legacy/tests/args_handler_test.py')
-rw-r--r-- | legacy/tests/args_handler_test.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/legacy/tests/args_handler_test.py b/legacy/tests/args_handler_test.py deleted file mode 100644 index dceca1f5..00000000 --- a/legacy/tests/args_handler_test.py +++ /dev/null @@ -1,36 +0,0 @@ -############################################################################## -# Copyright (c) 2016 ZTE Corp and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -import pytest -import mock -import qtip.utils.args_handler - - -@pytest.mark.xfail(reason="to be fixed") -class TestClass: - @pytest.mark.parametrize("test_input, expected", [ - (['fuel', '/home', 'benchmarks/testplan/default/network/iperf_bm.yaml'], - ['fuel', '/home', "iperf", - [('1-server', ['10.20.0.23']), ('2-host', ['10.20.0.24'])], - "iperf_bm.yaml", - [('duration', 20), ('protocol', 'tcp'), ('bandwidthGbps', 10)], - [("10.20.0.24", [None]), ("10.20.0.23", [None])], {}]) - ]) - @mock.patch('qtip.utils.args_handler.Env_setup.call_ping_test') - @mock.patch('qtip.utils.args_handler.Env_setup.call_ssh_test') - @mock.patch('qtip.utils.args_handler.Env_setup.update_ansible') - @mock.patch('qtip.utils.args_handler.SpawnVM') - @mock.patch('qtip.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"]) - qtip.utils.args_handler.Env_setup.fetch_compute_ips = mock_ips - qtip.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)) |