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
Boris Kocherov
erp5
Commits
b870faab
Commit
b870faab
authored
Sep 06, 2013
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test to interact in all Business Templates to find actions and allowed content types
parent
b8ef41df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
21 deletions
+24
-21
product/ERP5/tests/testXHTML.py
product/ERP5/tests/testXHTML.py
+24
-21
No files found.
product/ERP5/tests/testXHTML.py
View file @
b870faab
...
@@ -575,13 +575,15 @@ def testPortalTypeViewRecursivly(test_class, validator, module_id,
...
@@ -575,13 +575,15 @@ def testPortalTypeViewRecursivly(test_class, validator, module_id,
break
break
# create the object in portal_trash module
# create the object in portal_trash module
module_id
=
'portal_trash'
module_id
=
'portal_trash'
for
business_template_info
in
business_template_info_list
:
if
portal_type
not
in
business_template_info
.
actions
:
continue
for
action_information
in
business_template_info
.
actions
[
portal_type
]:
for
action_information
in
business_template_info
.
actions
[
portal_type
]:
if
(
action_information
[
'category'
]
in
(
'object_view'
,
'object_list'
)
and
if
(
action_information
[
'category'
]
in
(
'object_view'
,
'object_list'
)
and
action_information
[
'visible'
]
==
1
and
action_information
[
'visible'
]
==
1
and
action_information
[
'text
'
].
startswith
(
'string:${object_url}/'
)
and
action_information
[
'action
'
].
startswith
(
'string:${object_url}/'
)
and
len
(
action_information
[
'text
'
].
split
(
'/'
))
==
2
):
len
(
action_information
[
'action
'
].
split
(
'/'
))
==
2
):
view_name
=
action_information
[
'text
'
].
split
(
'/'
)[
-
1
].
split
(
'?'
)[
0
]
view_name
=
action_information
[
'action
'
].
split
(
'/'
)[
-
1
].
split
(
'?'
)[
0
]
method
=
makeTestMethod
(
validator
,
method
=
makeTestMethod
(
validator
,
module_id
,
module_id
,
portal_path
,
portal_path
,
...
@@ -594,13 +596,14 @@ def testPortalTypeViewRecursivly(test_class, validator, module_id,
...
@@ -594,13 +596,14 @@ def testPortalTypeViewRecursivly(test_class, validator, module_id,
method
.
__name__
=
method_name
method
.
__name__
=
method_name
setattr
(
test_class
,
method_name
,
method
)
setattr
(
test_class
,
method_name
,
method
)
module_id
=
backuped_module_id
module_id
=
backuped_module_id
business_template_info
=
backuped_business_template_info
# add the portal_type to the tested portal_types. This avoid to test many
# add the portal_type to the tested portal_types. This avoid to test many
# times a Portal Type wich is many bt.
# times a Portal Type wich is many bt.
tested_portal_type_list
.
append
(
portal_type
)
tested_portal_type_list
.
append
(
portal_type
)
new_portal_type_list
=
business_template_info
.
allowed_content_types
.
get
(
portal_type
,
())
new_portal_type_list
=
[]
for
tmp_business_template_info
in
business_template_info_list
:
new_portal_type_list
.
extend
(
tmp_business_template_info
.
allowed_content_types
.
get
(
portal_type
,
()))
new_portal_type_path_dict
=
{}
new_portal_type_path_dict
=
{}
if
base_path
!=
''
:
if
base_path
!=
''
:
...
...
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