[CMF-checkins] CVS: CMF/CMFStaging/tests - testLockTool.py:1.6 testVersions.py:1.7

Yvo Schubbe y.2004_ at wcm-solutions.de
Fri Oct 8 13:56:38 EDT 2004


Update of /cvs-repository/CMF/CMFStaging/tests
In directory cvs.zope.org:/tmp/cvs-serv7568/CMFStaging/tests

Modified Files:
	testLockTool.py testVersions.py 
Log Message:
- fixed ConnectionStateErrors


=== CMF/CMFStaging/tests/testLockTool.py 1.5 => 1.6 ===
--- CMF/CMFStaging/tests/testLockTool.py:1.5	Thu Aug 12 11:07:42 2004
+++ CMF/CMFStaging/tests/testLockTool.py	Fri Oct  8 13:56:38 2004
@@ -64,6 +64,7 @@
         app = self.app
         if hasattr(app, 'testroot'):
             app._delObject('testroot')
+        get_transaction().abort()
         self.app._p_jar.close()
 
     def testNotInitiallyLocked(self):
@@ -115,7 +116,6 @@
         self.assert_(not self.tool.isLockedOut(self.root.content))
         
 
-
 def test_suite():
     return unittest.TestSuite((
         unittest.makeSuite(Tests),
@@ -123,4 +123,3 @@
 
 if __name__ == '__main__':
     unittest.main(defaultTest='test_suite')
-


=== CMF/CMFStaging/tests/testVersions.py 1.6 => 1.7 ===
--- CMF/CMFStaging/tests/testVersions.py:1.6	Thu Aug 12 11:07:42 2004
+++ CMF/CMFStaging/tests/testVersions.py	Fri Oct  8 13:56:38 2004
@@ -52,15 +52,14 @@
         user = TestUser('sally')
         newSecurityManager(None, user.__of__(self.root.acl_users))
 
-
     def tearDown(self):
         app = self.app
         if hasattr(app, 'testroot'):
             app._delObject('testroot')
+        get_transaction().abort()
         self.app._p_jar.close()
         noSecurityManager()
 
-
     def testCheckinCheckout(self):
         vt = self.tool
         content = self.root.content
@@ -69,7 +68,6 @@
         vt.checkout(content)
         self.assert_(vt.isCheckedOut(content))
 
-
     def testGetVersionId(self):
         vt = self.tool
         content = self.root.content
@@ -83,7 +81,6 @@
         self.assertNotEqual(new_id, '')
         self.assertNotEqual(old_id, new_id)
 
-
     def testRevertToVersion(self):
         vt = self.tool
         content = self.root.content
@@ -99,7 +96,6 @@
         self.assertNotEqual(new_id, current_id)
         self.assertEqual(old_id, current_id)
 
-
     def testRevertToStickyThenCheckout(self):
         # Test that the versions tool automatically unsticks objects
         vt = self.tool
@@ -129,7 +125,6 @@
         self.assertNotEqual(current_id, old_id)
         self.assertNotEqual(current_id, new_id)
 
-
     def testRevertToOldThenCheckout(self):
         # Test that the versions tool automatically copies old states forward
         vt = self.tool
@@ -157,7 +152,6 @@
         self.assertNotEqual(current_id, old_id)
         self.assertNotEqual(current_id, new_id)
 
-
     def testGetLogEntries(self):
         vt = self.tool
         content = self.root.content
@@ -185,4 +179,3 @@
 
 if __name__ == '__main__':
     unittest.main(defaultTest='test_suite')
-



More information about the CMF-checkins mailing list