Merge "Implement Virtual Switch resilience test case"
[yardstick.git] / yardstick / tests / unit / benchmark / core / test_testcase.py
1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
3 #
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 ##############################################################################
9
10 # Unittest for yardstick.cmd.commands.testcase
11
12 from __future__ import absolute_import
13 import unittest
14
15 from yardstick.benchmark.core import testcase
16
17
18 class Arg(object):
19
20     def __init__(self):
21         self.casename = ('opnfv_yardstick_tc001',)
22
23
24 class TestcaseUT(unittest.TestCase):
25
26     def test_list_all(self):
27         t = testcase.Testcase()
28         result = t.list_all("")
29         self.assertIsInstance(result, list)
30
31     def test_show(self):
32         t = testcase.Testcase()
33         casename = Arg()
34         result = t.show(casename)
35         self.assertTrue(result)