[Erp5-report] r24242 - /erp5/trunk/products/ERP5Type/tests/testERP5Type.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Oct 20 11:02:21 CEST 2008


Author: jerome
Date: Mon Oct 20 11:02:19 2008
New Revision: 24242

URL: http://svn.erp5.org?rev=24242&view=rev
Log:
more assertions that temp objects are not in ZODB

Modified:
    erp5/trunk/products/ERP5Type/tests/testERP5Type.py

Modified: erp5/trunk/products/ERP5Type/tests/testERP5Type.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/testERP5Type.py?rev=24242&r1=24241&r2=24242&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/testERP5Type.py (original)
+++ erp5/trunk/products/ERP5Type/tests/testERP5Type.py Mon Oct 20 11:02:19 2008
@@ -30,6 +30,7 @@
 import unittest
 import sys
 
+import transaction
 from random import randint
 from Testing import ZopeTestCase
 from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
@@ -307,6 +308,13 @@
           raise self.failureException, "Container last ID modified"
       finally:
         delattr(portal.person_module.__class__, '_setLastId')
+
+      # the module is not changed from ZODB point of view
+      self.assertFalse(portal.person_module._p_changed)
+      # the object is not in ZODB
+      self.assertEquals(o._p_jar, None)
+      transaction.commit()
+      self.assertEquals(o._p_jar, None)
 
       # Check that creating 2 consecutive temp object automatically increases
       # their ID




More information about the Erp5-report mailing list