Merge "Allow VMs to access internet"
[yardstick.git] / yardstick / tests / unit / benchmark / scenarios / dummy / test_dummy.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.benchmark.scenarios.dummy.dummy
11
12 from __future__ import absolute_import
13 import unittest
14
15 from yardstick.benchmark.scenarios.dummy import dummy
16
17
18 class DummyTestCase(unittest.TestCase):
19
20     def setUp(self):
21         self.test_context = dummy.Dummy(None, None)
22
23         self.assertIsNone(self.test_context.scenario_cfg)
24         self.assertIsNone(self.test_context.context_cfg)
25         self.assertFalse(self.test_context.setup_done)
26
27     def test_run(self):
28         result = {}
29         self.test_context.run(result)
30
31         self.assertEqual(result["hello"], "yardstick")
32         self.assertTrue(self.test_context.setup_done)