1 ##############################################################################
2 # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
10 from mock import patch
12 from yardstick.cmd.commands.testcase import TestcaseCommands
15 class TestcaseCommandsUT(unittest.TestCase):
16 @patch('yardstick.cmd.commands.testcase.TestcaseCommands._format_print')
17 @patch('yardstick.cmd.commands.client')
18 def test_do_list(self, mock_client, mock_print):
19 mock_client.get.return_value = {'result': []}
20 TestcaseCommands().do_list({})
21 mock_print.assert_called_once()