Remove references to "dpdk_nic_bind" utility
[yardstick.git] / tests / unit / benchmark / scenarios / test_base.py
1 # Copyright 2017: Intel Ltd.
2 # All Rights Reserved.
3 #
4 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
5 #    not use this file except in compliance with the License. You may obtain
6 #    a copy of the License at
7 #
8 #         http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #    Unless required by applicable law or agreed to in writing, software
11 #    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 #    License for the specific language governing permissions and limitations
14 #    under the License.
15
16 import unittest
17
18 from yardstick.benchmark.scenarios import base
19
20
21 class ScenarioTestCase(unittest.TestCase):
22
23     def test_get_scenario_type(self):
24         scenario_type = 'dummy scenario'
25
26         class DummyScenario(base.Scenario):
27             __scenario_type__ = scenario_type
28
29         self.assertEqual(scenario_type, DummyScenario.get_scenario_type())
30
31     def test_get_scenario_type_not_defined(self):
32         class DummyScenario(base.Scenario):
33             pass
34
35         self.assertEqual(str(None), DummyScenario.get_scenario_type())
36
37     def test_get_description(self):
38         docstring = """First line
39             Second line
40             Third line
41         """
42
43         class DummyScenario(base.Scenario):
44             __doc__ = docstring
45
46         self.assertEqual(docstring.splitlines()[0],
47                          DummyScenario.get_description())
48
49     def test_get_description_empty(self):
50         class DummyScenario(base.Scenario):
51             pass
52
53         self.assertEqual(str(None), DummyScenario.get_description())