Add Dummy context and scenario type
[yardstick.git] / tests / unit / benchmark / contexts / test_dummy.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.benchmark.contexts.dummy
13
14 import unittest
15
16 from yardstick.benchmark.contexts import dummy
17
18
19 class DummyContextTestCase(unittest.TestCase):
20
21     def setUp(self):
22         self.test_context = dummy.DummyContext()
23
24     def test__get_server(self):
25         self.test_context.init(None)
26         self.test_context.deploy()
27
28         result = self.test_context._get_server(None)
29         self.assertEqual(result, None)
30
31         self.test_context.undeploy()