|
@@ -54,7 +54,7 @@ class TestEmClassCreation(ClassesTestCase):
|
54
|
54
|
# should be able to select on the created table
|
55
|
55
|
def test_table_em_classes(self):
|
56
|
56
|
""" Testing ability of EmClass to crate its associated table """
|
57
|
|
- conn = sqlutils.getEngine().connect()
|
|
57
|
+ conn = sqlutils.get_engine().connect()
|
58
|
58
|
a = sqlutils.meta(conn)
|
59
|
59
|
try:
|
60
|
60
|
newtable = sqla.Table('testClass', sqlutils.meta(conn))
|
|
@@ -97,7 +97,7 @@ class TestEmClassDeletion(ClassesTestCase):
|
97
|
97
|
# test if the table is deleted after a call to delete
|
98
|
98
|
def test_table_delete(self):
|
99
|
99
|
""" Test associated table deletetion on EmClass deletion """
|
100
|
|
- dbe = sqlutils.getEngine()
|
|
100
|
+ dbe = sqlutils.get_engine()
|
101
|
101
|
for i,class_name in enumerate(self.names):
|
102
|
102
|
cur_class = EmClass(class_name)
|
103
|
103
|
self.assertTrue(cur_class.delete(), "delete method didn't return True but the class has no fieldgroups")
|
|
@@ -117,7 +117,7 @@ class TestEmClassDeletion(ClassesTestCase):
|
117
|
117
|
test_class = EmClass(self.names[0])
|
118
|
118
|
fieldgroup = EmFieldGroup.create('fooFieldGroup', test_class)
|
119
|
119
|
self.assertFalse(test_class.delete(), "delete method returns True but the class has fieldgroup")
|
120
|
|
- dbe = sqlutils.getEngine()
|
|
120
|
+ dbe = sqlutils.get_engine()
|
121
|
121
|
meta = sqlutils.meta(dbe)
|
122
|
122
|
self.assertIn(self.names[0], meta.tables, "Table has been deleted but the class has fieldgroup")
|
123
|
123
|
try:
|
|
@@ -237,7 +237,7 @@ class TestEmClassLinkType(ClassesTestCase):
|
237
|
237
|
# should be able to select on the created table
|
238
|
238
|
def test_table_classes_types(self):
|
239
|
239
|
""" Test if a table 'testEntity_keywords' was created """
|
240
|
|
- conn = sqlutils.getEngine().connect()
|
|
240
|
+ conn = sqlutils.get_engine().connect()
|
241
|
241
|
a = sqlutils.meta(conn)
|
242
|
242
|
try:
|
243
|
243
|
newtable = sqla.Table('testEntity_keywords', sqlutils.meta(conn))
|