Commit 29608d83 authored by Mame Coumba Sall's avatar Mame Coumba Sall

add new test to check empty selection names

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26169 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7bb1d54f
......@@ -141,6 +141,23 @@ class TestXHTML(ERP5TypeTestCase):
error_list.append((field_path, field.get_value('form_id'),
field.get_value('field_id')))
self.assertEquals(error_list, [])
def test_emptySelectionNameInListbox(self):
# check all empty selection name 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):
try:
fields = form.get_fields()
except AttributeError, e:
print "%s is broken: %s" % (form_path, e)
for field in fields:
if field.meta_type =='ListBox':
selection_name = field.get_value("selection_name")
if selection_name in ("",None):
error_list.append(form_path)
self.assertEquals(error_list, [])
class W3Validator(object):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment