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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
13c7cc99
Commit
13c7cc99
authored
Mar 14, 2018
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
textXHTML: Add test for checking count method on listbox
parent
700cf6b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
product/ERP5/tests/testXHTML.py
product/ERP5/tests/testXHTML.py
+18
-0
No files found.
product/ERP5/tests/testXHTML.py
View file @
13c7cc99
...
@@ -313,6 +313,24 @@ class TestXHTMLMixin(ERP5TypeTestCase):
...
@@ -313,6 +313,24 @@ class TestXHTMLMixin(ERP5TypeTestCase):
error_list
.
append
((
form_path
,
list_method
))
error_list
.
append
((
form_path
,
list_method
))
self
.
assertEqual
(
error_list
,
[])
self
.
assertEqual
(
error_list
,
[])
def
test_callableCountMethodInListbox
(
self
):
# check all count_method in listboxes
skins_tool
=
self
.
portal
.
portal_skins
error_list
=
[]
for
form_path
,
form
in
skins_tool
.
ZopeFind
(
skins_tool
,
obj_metatypes
=
[
'ERP5 Form'
],
search_sub
=
1
):
for
field
in
self
.
getFieldList
(
form
,
form_path
):
if
field
.
getRecursiveTemplateField
().
meta_type
==
'ListBox'
:
count_method
=
field
.
get_value
(
"count_method"
)
if
count_method
:
if
isinstance
(
count_method
,
str
):
method
=
getattr
(
self
.
portal
,
count_method
,
None
)
else
:
method
=
count_method
if
not
callable
(
method
):
error_list
.
append
((
form_path
,
count_method
))
self
.
assertEqual
(
error_list
,
[])
def
test_listActionInListbox
(
self
):
def
test_listActionInListbox
(
self
):
# check all list_action in listboxes
# check all list_action in listboxes
skins_tool
=
self
.
portal
.
portal_skins
skins_tool
=
self
.
portal
.
portal_skins
...
...
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