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
Georgios Dagkakis
erp5
Commits
38a6e9a5
Commit
38a6e9a5
authored
Oct 02, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hack to prevent keeping too many open files in testxhtml
parent
3b1a6511
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
product/ERP5/tests/utils.py
product/ERP5/tests/utils.py
+6
-4
No files found.
product/ERP5/tests/utils.py
View file @
38a6e9a5
...
...
@@ -40,6 +40,11 @@ else:
from
Products.ERP5Type.tests.backportUnittest
import
\
expectedFailure
as
newSimulationExpectedFailure
# Keep a global reference to a ZODB storage so that we can import business
# template xml files. XXX this connection will remain open.
db
=
DB
(
DemoStorage
())
connection
=
db
.
open
()
class
BusinessTemplateInfoBase
:
...
...
@@ -103,15 +108,12 @@ class BusinessTemplateInfoBase:
def
setUpActions
(
self
):
def
parse
(
file_path
):
db
=
DB
(
DemoStorage
())
_connection
=
db
.
open
()
action_information
=
importXML
(
_connection
,
file_path
)
action_information
=
importXML
(
connection
,
file_path
)
action_information
.
__repr__
()
for
key
,
value
in
action_information
.
__dict__
.
iteritems
():
if
value
not
in
(
None
,
""
)
and
key
in
(
'action'
,
'condition'
)
:
setattr
(
action_information
,
key
,
value
.
text
)
actions
=
action_information
.
__dict__
.
copy
()
db
.
close
()
return
actions
name
=
'%s/ActionTemplateItem/portal_types/'
%
self
.
getPrefix
()
...
...
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