1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/usr/bin/env python3
"""
_GetScenario_
Unittest for GetScenario module
"""
import unittest
from Configuration.DataProcessing.GetScenario import getScenario
class GetScenarioTest(unittest.TestCase):
"""GetScenario module test"""
def testA(self):
"""test retrieving the Test scenario"""
try:
scenario = getScenario("Test")
except Exception as ex:
msg = "Failed to get Test scenario:\n"
msg += str(ex)
self.fail(msg)
def testB(self):
"""test retrieving non existent Scenario"""
self.assertRaises(RuntimeError,
getScenario, "ThisScenarioDoesNotExist")
if __name__ == '__main__':
unittest.main()
|