Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_workflow
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenjie.zheng
erp5_workflow
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
Show 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 @@
...
@@ -31,6 +31,7 @@
import
gc
import
gc
import
unittest
import
unittest
import
transaction
from
persistent
import
Persistent
from
persistent
import
Persistent
from
Products.ERP5Type.dynamic.portal_type_class
import
synchronizeDynamicModules
from
Products.ERP5Type.dynamic.portal_type_class
import
synchronizeDynamicModules
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
...
@@ -1062,7 +1063,8 @@ class TestZodbPropertySheet(ERP5TypeTestCase):
...
@@ -1062,7 +1063,8 @@ class TestZodbPropertySheet(ERP5TypeTestCase):
"""
"""
# Open new connection and add a new constraint.
# Open new connection and add a new constraint.
db
=
self
.
app
.
_p_jar
.
db
()
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
)
app
=
con
.
root
()[
'Application'
].
__of__
(
self
.
app
.
aq_parent
)
portal
=
app
[
self
.
getPortalName
()]
portal
=
app
[
self
.
getPortalName
()]
from
Products.ERP5.ERP5Site
import
getSite
,
setSite
from
Products.ERP5.ERP5Site
import
getSite
,
setSite
...
@@ -1077,15 +1079,14 @@ class TestZodbPropertySheet(ERP5TypeTestCase):
...
@@ -1077,15 +1079,14 @@ class TestZodbPropertySheet(ERP5TypeTestCase):
expression
=
'python: object.getTitle() == "my_tales_constraint_title"'
)
expression
=
'python: object.getTitle() == "my_tales_constraint_title"'
)
dummy
.
Predicate_view
()
dummy
.
Predicate_view
()
self
.
commit
()
tm
.
commit
()
# Recreate class with a newly added constraint
# Recreate class with a newly added constraint
synchronizeDynamicModules
(
portal
,
force
=
True
)
synchronizeDynamicModules
(
portal
,
force
=
True
)
# Load test_module
# Load test_module
test_module
=
getattr
(
portal
,
'Test Migration'
)
getattr
(
portal
,
'Test Migration'
).
objectValues
()
test_module
.
objectValues
()
# Then close this new connection.
# Then close this new connection.
self
.
abort
()
tm
.
abort
()
con
.
close
()
con
.
close
()
# This code depends on ZODB implementation.
# This code depends on ZODB implementation.
for
i
in
db
.
pool
.
available
[:]:
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