[Modeling-cvs] ProjectModeling/Modeling/tests test_EditingContext_Global_Inheritance.py,1.10,1.11
Status: Abandoned
Brought to you by:
sbigaret
From: <sbi...@us...> - 2003-06-12 09:35:23
|
Update of /cvsroot/modeling/ProjectModeling/Modeling/tests In directory sc8-pr-cvs1:/tmp/cvs-serv11362/tests Modified Files: test_EditingContext_Global_Inheritance.py Log Message: Fixed bug #753147: fetching twice or more with a given FetchSpecification did not return the same result set (the original FetchSpec was modified) Index: test_EditingContext_Global_Inheritance.py =================================================================== RCS file: /cvsroot/modeling/ProjectModeling/Modeling/tests/test_EditingContext_Global_Inheritance.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** test_EditingContext_Global_Inheritance.py 11 Jun 2003 11:10:20 -0000 1.10 --- test_EditingContext_Global_Inheritance.py 12 Jun 2003 09:35:20 -0000 1.11 *************** *** 90,94 **** def test_03_toOneFault_notifications(self): ! "[EditingContext] toOneFault/GlobalIDChangedNotification" ec1=EditingContext() ec2=EditingContext() --- 90,94 ---- def test_03_toOneFault_notifications(self): ! "[EditingContext/Inheritance] toOneFault/GlobalIDChangedNotification" ec1=EditingContext() ec2=EditingContext() *************** *** 145,149 **** def test_04_validation(self): ! "[EditingContext] test Validation" ec=EditingContext() qual=qualifierWithQualifierFormat('street like "2,*"') --- 145,149 ---- def test_04_validation(self): ! "[EditingContext/Inheritance] test Validation" ec=EditingContext() qual=qualifierWithQualifierFormat('street like "2,*"') *************** *** 159,163 **** def test_05_toOneFault_uniquing(self): ! "[EditingContext] Tests that toFaults are also unique within a ec" ec=EditingContext() # get address for John Cleese --- 159,163 ---- def test_05_toOneFault_uniquing(self): ! "[EditingContext/Inheritance] Tests that toFaults are also unique within a ec" ec=EditingContext() # get address for John Cleese *************** *** 182,186 **** def test_05b_toOneFault_uniquing(self): ! "[EditingContext] Tests unicity for toOne-related objects when they are already fetched" ## In this test we make sure that, after an object has been fetched, ## any other object pointing to it do not get a to-one fault, but the --- 182,186 ---- def test_05b_toOneFault_uniquing(self): ! "[EditingContext/Inheritance] Tests unicity for toOne-related objects when they are already fetched" ## In this test we make sure that, after an object has been fetched, ## any other object pointing to it do not get a to-one fault, but the *************** *** 241,245 **** def test_06_objectsCountWithFetchSpecification(self): ! "[EditingContext] objectsCountWithFetchSpecification" ec=EditingContext() fs=FetchSpecification(entityName='Employee') --- 241,245 ---- def test_06_objectsCountWithFetchSpecification(self): ! "[EditingContext/Inheritance] objectsCountWithFetchSpecification" ec=EditingContext() fs=FetchSpecification(entityName='Employee') *************** *** 252,255 **** --- 252,272 ---- self.failIf(nb!=2) + def test_07_fetch_shouldnt_change_FetchSpecification(self): + "[EditingContext/Inheritance] fetching shouldn't change FetchSpecification" + # Bug #753147 + from StoreEmployees import Address + from Modeling.FetchSpecification import FetchSpecification as FS + from Modeling.EditingContext import EditingContext as EC + from Modeling.Qualifier import qualifierWithQualifierFormat as qWQF + + ec = EC() + q = qWQF('toAddresses.zipCode like "4%"') + fs_deep = FS('Employee', qualifier=q, deepFlag=1) # Note the deepFlag + objs1=ec.objectsWithFetchSpecification(fs_deep) + self.failIf(len(objs1)!=3) + self.failIf(fs_deep.entityName()!='Employee') + objs2=ec.objectsWithFetchSpecification(fs_deep) + self.failIf(len(objs2)!=3) + def tearDown(self): """ |