Update of /cvsroot/modeling/ProjectModeling/Modeling/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv25038/tests
Modified Files:
test_EditingContext_Global.py
test_EditingContext_Global_Inheritance.py
test_EditingContext_ParentChild.py
test_EntityClassDescription.py run.py
Log Message:
Adapted tests to the new caching mechanism for models and class description
Index: test_EditingContext_Global.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_EditingContext_Global.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** test_EditingContext_Global.py 23 Jul 2003 14:10:13 -0000 1.31
--- test_EditingContext_Global.py 24 Jul 2003 11:30:52 -0000 1.32
***************
*** 38,41 ****
--- 38,42 ----
import utils
if __name__ == "__main__":
+ utils.disable_model_cache()
utils.fixpath()
***************
*** 905,909 ****
def test_17b_insertedObject_and_FK_as_classProperty(self):
"[EC] Checks that a FK/class prop. gets its value after saving changes"
- return
ec=EditingContext()
w=Writer()
--- 906,909 ----
***************
*** 1253,1256 ****
--- 1253,1258 ----
if database_cfg=='MySQL.cfg':
author_books_model.entityNamed('Writer').attributeNamed('birthday').setExternalType('DATETIME')
+
+ utils.enable_model_cache_and_compute()
if reinitDB_flag: reinitDB(); return
Index: test_EditingContext_Global_Inheritance.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_EditingContext_Global_Inheritance.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** test_EditingContext_Global_Inheritance.py 16 Jul 2003 19:16:00 -0000 1.15
--- test_EditingContext_Global_Inheritance.py 24 Jul 2003 11:30:52 -0000 1.16
***************
*** 38,41 ****
--- 38,42 ----
import utils
if __name__ == "__main__":
+ utils.disable_model_cache()
utils.fixpath()
***************
*** 535,538 ****
--- 536,541 ----
model=ModelSet.defaultModelSet().modelNamed('StoreEmployees')
Model.updateModelWithCFG(model, database_cfg)
+
+ utils.enable_model_cache_and_compute()
if reinitDB_flag: reinitDB(); return
Index: test_EditingContext_ParentChild.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_EditingContext_ParentChild.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** test_EditingContext_ParentChild.py 17 Jul 2003 15:16:28 -0000 1.11
--- test_EditingContext_ParentChild.py 24 Jul 2003 11:30:52 -0000 1.12
***************
*** 16,19 ****
--- 16,20 ----
import utils
if __name__ == "__main__":
+ utils.disable_model_cache()
utils.fixpath()
***************
*** 655,658 ****
--- 656,661 ----
author_books_model.entityNamed('Writer').attributeNamed('birthday').setExternalType('DATETIME')
+ utils.enable_model_cache_and_compute()
+
if reinitDB_flag:
from test_EditingContext_Global import reinitDB
Index: test_EntityClassDescription.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_EntityClassDescription.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_EntityClassDescription.py 2 Mar 2003 18:53:54 -0000 1.3
--- test_EntityClassDescription.py 24 Jul 2003 11:30:52 -0000 1.4
***************
*** 36,39 ****
--- 36,40 ----
if __name__ == "__main__":
import utils, sys
+ utils.disable_model_cache()
utils.fixpath()
Index: run.py
===================================================================
RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/run.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** run.py 23 Jul 2003 12:19:10 -0000 1.6
--- run.py 24 Jul 2003 11:30:52 -0000 1.7
***************
*** 27,34 ****
"""Run all tests."""
__version__='$Revision$'[11:-2]
! import os, sys, getopt
import utils
import unittest
# Modeling Layer
import test_Model
--- 27,37 ----
"""Run all tests."""
__version__='$Revision$'[11:-2]
! import sys, getopt
import utils
import unittest
+ if __name__ == "__main__":
+ utils.disable_model_cache() # test_EntityClassDescription requires it
+
# Modeling Layer
import test_Model
|