Data-Test-Executer Framework speziell zum Test von Datenverarbeitungen mit Datengenerierung, Systemvorbereitungen, Einspielungen, ganzheitlicher diversifizierender Vergleich
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
987 B

3 years ago
import unittest
import utils.config_tool as t
3 years ago
from basic.program import Job
import test.constants
import os
3 years ago
HOME_PATH = test.constants.HOME_PATH
VERIFY = False
3 years ago
class MyTestCase(unittest.TestCase):
def runTest(self):
self.test_getConfig()
def test_getConfig(self):
3 years ago
job = Job("unit")
args = {"application": "TEST", "application": "ENV01", "modus": "unit", "loglevel": "debug", "tool": "config_tool",
"modus": "unit"}
job.par.setParameterArgs(args)
r = t.getConfigPath("tool", "path")
self.assertEqual(r, os.path.join(HOME_PATH, "utils","configs","path.yml"))
r = t.getConfigPath("comp", "TestX2")
3 years ago
self.assertEqual(r, None)
r = t.getConfigPath("comp", "testA2")
r = t.getConfig("tool", "path")
if VERIFY: print("pattern " + r["pattern"]["log"])
if VERIFY: print("pattern " + r["pattern"]["precond"])
3 years ago
if __name__ == '__main__':
VERIFY = True
3 years ago
unittest.main()