Commit b9d73d97 authored by Jérome Perrin's avatar Jérome Perrin

more assertions that temp objects are not in ZODB


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24242 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 550271b8
......@@ -30,6 +30,7 @@ import md5
import unittest
import sys
import transaction
from random import randint
from Testing import ZopeTestCase
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
......@@ -308,6 +309,13 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
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
o = portal.person_module.newContent(portal_type="Person",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment