Ulrich Carmesin
2 years ago
19 changed files with 329 additions and 141 deletions
@ -1,4 +1,17 @@ |
|||
HOME_PATH = "/home/ulrich/6_Projekte/Programme/datest" |
|||
DATA_PATH = "/home/ulrich/6_Projekte/Programme/data" |
|||
COMP_PATH = "/home/ulrich/6_Projekte/Programme/data/components" |
|||
""" |
|||
constants |
|||
""" |
|||
import os |
|||
home = os.getcwd() |
|||
prgdir = "" |
|||
if home[-6:] == "datest": |
|||
prgdir = home[-6:] |
|||
home = home[0:-7] |
|||
elif home[-7:] == "program": |
|||
prgdir = home[-7:] |
|||
home = home[0:-8] |
|||
HOME_PATH = home |
|||
DATA_PATH = os.path.join(home, "data") |
|||
PROG_PATH = os.path.join(home, prgdir) |
|||
COMP_PATH = os.path.join(home, prgdir, "components") |
|||
OS_SYSTEM = "linux" |
@ -0,0 +1,27 @@ |
|||
import unittest |
|||
import basic.program |
|||
import utils.conn_tool |
|||
|
|||
TEST_FUNCTIONS = ["test_01conn"] |
|||
#TEST_FUNCTIONS = ["test_01conn"] |
|||
verbose = True |
|||
|
|||
class MyTestCase(unittest.TestCase): |
|||
def runTest(self): |
|||
self.test_conn() |
|||
|
|||
def test_01conn(self): |
|||
if verbose: print("# # # # testComponents # # # # #") |
|||
job = basic.program.Job("unit") |
|||
args = { "application" : "TEST" , "environment" : "ENV01", "modus" : "unit", "loglevel" : "debug", "tool" : "job_tool"} |
|||
job.par.setParameterArgs(args) |
|||
self.assertEqual(True, True) |
|||
conn = utils.conn_tool.getConnection("testcm", 1) |
|||
if verbose: print("test-conn " + str(conn)) |
|||
conns = utils.conn_tool.getConnections("testcrmdb") |
|||
if verbose: print("test-conn " + str(conns)) |
|||
conns = utils.conn_tool.getConnections("testprd") |
|||
if verbose: print("test-conn " + str(conns)) |
|||
|
|||
if __name__ == '__main__': |
|||
unittest.main() |
@ -1,23 +0,0 @@ |
|||
import unittest |
|||
import basic.program |
|||
import utils.conn_tool |
|||
|
|||
class MyTestCase(unittest.TestCase): |
|||
def runTest(self): |
|||
self.test_conn() |
|||
|
|||
def test_conn(self): |
|||
print("# # # # tetsComponents # # # # #") |
|||
job = basic.program.Job("unit") |
|||
args = { "application" : "TEST" , "environment" : "ENV01", "modus" : "unit", "loglevel" : "debug", "tool" : "job_tool"} |
|||
job.par.setParameterArgs(args) |
|||
self.assertEqual(True, True) |
|||
conn = utils.conn_tool.getConnection("testb", 1) |
|||
print("test-conn " + str(conn)) |
|||
conns = utils.conn_tool.getConnections("testb") |
|||
print("test-conn " + str(conns)) |
|||
conns = utils.conn_tool.getConnections("testa") |
|||
print("test-conn " + str(conns)) |
|||
|
|||
if __name__ == '__main__': |
|||
unittest.main() |
Loading…
Reference in new issue