Merge "Remove unused methods in SampleVNF"
[yardstick.git] / yardstick / tests / functional / test_cli_runner.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 import unittest
11
12 from yardstick.tests.functional import utils
13
14
15 class RunnerTestCase(unittest.TestCase):
16
17     def setUp(self):
18         super(RunnerTestCase, self).setUp()
19         self.yardstick = utils.Yardstick()
20
21     def test_runner_list(self):
22         res = self.yardstick("runner list")
23
24         self.assertIn("Duration", res)
25         self.assertIn("Arithmetic", res)
26         self.assertIn("Iteration", res)
27         self.assertIn("Sequence", res)
28
29     def test_runner_show_Duration(self):
30         res = self.yardstick("runner show Duration")
31         duration = "duration - amount of time" in res
32         self.assertTrue(duration)
33
34     def test_runner_show_Arithmetic(self):
35         res = self.yardstick("runner show Arithmetic")
36         arithmetic = "Run a scenario arithmetically" in res
37         self.assertTrue(arithmetic)
38
39     def test_runner_show_Iteration(self):
40         res = self.yardstick("runner show Iteration")
41         iteration = "iterations - amount of times" in res
42         self.assertTrue(iteration)
43
44     def test_runner_show_Sequence(self):
45         res = self.yardstick("runner show Sequence")
46         sequence = "sequence - list of values which are executed" in res
47         self.assertTrue(sequence)