Commit 6b6195b3 authored by Romain Courteaud's avatar Romain Courteaud

erp5_trade is now compatible with the field library guideline

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@35009 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e43c8253
...@@ -185,20 +185,23 @@ class TestXHTML(ERP5TypeTestCase): ...@@ -185,20 +185,23 @@ class TestXHTML(ERP5TypeTestCase):
% '\n\t'.join(str(e) for e in error_list) % '\n\t'.join(str(e) for e in error_list)
self.fail(message) self.fail(message)
@expectedFailure
def test_configurationOfFieldLibrary(self): def test_configurationOfFieldLibrary(self):
error_list = [] error_list = []
for business_template in self.portal.portal_templates.searchFolder(): for business_template in self.portal.portal_templates.searchFolder(
title=['erp5_trade']):
# XXX Impossible to filter by installation state, as it is not catalogued # XXX Impossible to filter by installation state, as it is not catalogued
business_template = business_template.getObject() business_template = business_template.getObject()
for modifiable_field in business_template.BusinessTemplate_getModifiableFieldList(): for modifiable_field in business_template.BusinessTemplate_getModifiableFieldList():
error_list.append((modifiable_field.object_id, # Do not consider 'Check delegated values' as an error
modifiable_field.choice_item_list[0][0])) if modifiable_field.choice_item_list[0][1] != \
"0_check_delegated_value":
error_list.append((modifiable_field.object_id,
modifiable_field.choice_item_list[0][0]))
if error_list: if error_list:
message = '%s fields to modify' % len(error_list) message = '%s fields to modify' % len(error_list)
#message += '\n\t' + '\n\t'.join(fieldname + ": " + message message += '\n\t' + '\n\t'.join(fieldname + ": " + message
# for fieldname, message in error_list) for fieldname, message in error_list)
self.fail(message) # uncomment above for details on each field self.fail(message)
def test_portalTypesDomainTranslation(self): def test_portalTypesDomainTranslation(self):
# according to bt5-Module.Creation.Guidelines document, module # according to bt5-Module.Creation.Guidelines document, module
......
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