summaryrefslogtreecommitdiffstats
path: root/tests/unit/cmd/commands/test_testcase.py
blob: 515784352503b5e6ff17bb4d838c2b2a828dd3bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import unittest
from mock import patch

from yardstick.cmd.commands.testcase import TestcaseCommands


class TestcaseCommandsUT(unittest.TestCase):
    @patch('yardstick.cmd.commands.testcase.TestcaseCommands._format_print')
    @patch('yardstick.cmd.commands.client')
    def test_do_list(self, mock_client, mock_print):
        mock_client.get.return_value = {'result': []}
        TestcaseCommands().do_list({})
        self.assertTrue(mock_print.called)


def main():
    unittest.main()


if __name__ == '__main__':
    main()