Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Vivek
erp5
Commits
59714525
Commit
59714525
authored
Jan 08, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testDynamicClassGeneration: fix testConstraintAfterClosingZODBConnection on Zope 2.13
parent
331625e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
product/ERP5Type/tests/testDynamicClassGeneration.py
product/ERP5Type/tests/testDynamicClassGeneration.py
+6
-5
No files found.
product/ERP5Type/tests/testDynamicClassGeneration.py
View file @
59714525
...
...
@@ -31,6 +31,7 @@
import
gc
import
unittest
import
transaction
from
persistent
import
Persistent
from
Products.ERP5Type.dynamic.portal_type_class
import
synchronizeDynamicModules
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
...
...
@@ -1062,7 +1063,8 @@ class TestZodbPropertySheet(ERP5TypeTestCase):
"""
# Open new connection and add a new constraint.
db
=
self
.
app
.
_p_jar
.
db
()
con
=
db
.
open
()
tm
=
transaction
.
TransactionManager
()
con
=
db
.
open
(
transaction_manager
=
tm
)
app
=
con
.
root
()[
'Application'
].
__of__
(
self
.
app
.
aq_parent
)
portal
=
app
[
self
.
getPortalName
()]
from
Products.ERP5.ERP5Site
import
getSite
,
setSite
...
...
@@ -1077,15 +1079,14 @@ class TestZodbPropertySheet(ERP5TypeTestCase):
expression
=
'python: object.getTitle() == "my_tales_constraint_title"'
)
dummy
.
Predicate_view
()
self
.
commit
()
tm
.
commit
()
# Recreate class with a newly added constraint
synchronizeDynamicModules
(
portal
,
force
=
True
)
# Load test_module
test_module
=
getattr
(
portal
,
'Test Migration'
)
test_module
.
objectValues
()
getattr
(
portal
,
'Test Migration'
).
objectValues
()
# Then close this new connection.
self
.
abort
()
tm
.
abort
()
con
.
close
()
# This code depends on ZODB implementation.
for
i
in
db
.
pool
.
available
[:]:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment