|
|
@ -9,7 +9,7 @@ import inspect |
|
|
|
import test.testtools |
|
|
|
import basic.constants as B |
|
|
|
import test.constants as T |
|
|
|
import model.table |
|
|
|
import model.datatable |
|
|
|
import model.entity |
|
|
|
|
|
|
|
HOME_PATH = test.constants.HOME_PATH |
|
|
@ -31,9 +31,9 @@ class MyTestCase(unittest.TestCase): |
|
|
|
if actfunction not in TEST_FUNCTIONS: |
|
|
|
return |
|
|
|
job = test.testtools.getJob() |
|
|
|
table = model.table.Table(job, "TESTPROJ") |
|
|
|
table = model.datatable.Datatable(job, "TESTPROJ") |
|
|
|
entityNames = table.read_unique_names(job, "", "", "", {}) |
|
|
|
self.assertEquals(type(entityNames), list) |
|
|
|
self.assertEqual(type(entityNames), list) |
|
|
|
#entityNames = project.select_unique_names(job, "", "", "", {}) |
|
|
|
#self.assertEquals(type(entityNames), list) |
|
|
|
|
|
|
@ -45,7 +45,7 @@ class MyTestCase(unittest.TestCase): |
|
|
|
if actfunction not in TEST_FUNCTIONS: |
|
|
|
return |
|
|
|
job = test.testtools.getJob() |
|
|
|
table = model.table.Table(job, "TESTPROJ") |
|
|
|
table = model.datatable.Datatable(job, "TESTPROJ") |
|
|
|
entityNames = [] |
|
|
|
entityNames = table.get_entities(job, storage=model.entity.STORAGE_FILE) |
|
|
|
self.assertEqual(type(entityNames), list) |
|
|
@ -60,10 +60,10 @@ class MyTestCase(unittest.TestCase): |
|
|
|
if actfunction not in TEST_FUNCTIONS: |
|
|
|
return |
|
|
|
job = test.testtools.getJob() |
|
|
|
table = model.table.Table(job, "TESTPROJ") |
|
|
|
table = model.datatable.Datatable(job, "TESTPROJ") |
|
|
|
name = "adress" |
|
|
|
acttable = table.read_entity(job, name) |
|
|
|
self.assertEqual(getattr(acttable, model.table.FIELD_NAME), name) |
|
|
|
self.assertEqual(getattr(acttable, model.datatable.FIELD_NAME), name) |
|
|
|
self.assertRaises(Exception, table.read_entity, job, "xyzxyz") |
|
|
|
# |
|
|
|
#actrelease = release.select_entity(job, name) |