summaryrefslogtreecommitdiffstats
path: root/tests/unit/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/cmd')
-rw-r--r--tests/unit/cmd/commands/test_testcase.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/unit/cmd/commands/test_testcase.py b/tests/unit/cmd/commands/test_testcase.py
new file mode 100644
index 000000000..515784352
--- /dev/null
+++ b/tests/unit/cmd/commands/test_testcase.py
@@ -0,0 +1,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()