Fixed document for Grafana Port usage
[yardstick.git] / tests / unit / benchmark / core / 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 from __future__ import absolute_import
15 import unittest
16
17 from yardstick.benchmark.core import testcase
18
19
20 class Arg(object):
21
22     def __init__(self):
23         self.casename = ('opnfv_yardstick_tc001',)
24
25
26 class TestcaseUT(unittest.TestCase):
27
28     def test_list_all(self):
29         t = testcase.Testcase()
30         result = t.list_all("")
31         self.assertIsInstance(result, list)
32
33     def test_show(self):
34         t = testcase.Testcase()
35         casename = Arg()
36         result = t.show(casename)
37         self.assertTrue(result)
38
39
40 def main():
41     unittest.main()
42
43
44 if __name__ == '__main__':
45     main()