change ci from base-on-pod to base-on-scenario (in progress)
[yardstick.git] / tests / unit / cmd / commands / test_testcase.py
1 #!/usr/bin/env python
2
3 ##############################################################################
4 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
11
12 # Unittest for yardstick.cmd.commands.testcase
13
14 import mock
15 import unittest
16
17 from yardstick.cmd.commands import testcase
18 from yardstick.cmd.commands.testcase import TestcaseCommands
19
20 class Arg(object):
21     def __init__(self):
22         self.casename=('opnfv_yardstick_tc001',)
23
24 class TestcaseCommandsUT(unittest.TestCase):
25
26     def test_do_list(self):
27         t = testcase.TestcaseCommands()
28         result = t.do_list("")
29         self.assertEqual(result, True)
30
31     def test_do_show(self):
32         t = testcase.TestcaseCommands()
33         casename = Arg()
34         result = t.do_show(casename)
35         self.assertEqual(result, True)
36