[Erp5-dev] [Erp5-report] ERP5 r29155: 2856 Tests, 15 Errors, 14 Failures
MURAOKA Yusuke
yusuke at nexedi.com
Thu Sep 24 14:46:03 CEST 2009
Hi,
> FAIL: test_report_view_sheet_per_report_section (testOOoStyle.TestODSStyle)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/usr/lib/erp5/lib/python/Testing/ZopeTestCase/profiler.py", line 98, in __call__
> testMethod()
> File "/home/buildbot/slave/parts/bot_broken_screen/full.ERP5/build/unit_test/Products/ERP5OOo/tests/testOOoStyle.py", line 200, in test_report_view_sheet_per_report_section
> self.assertEquals(HTTP_OK, response.getStatus())
> AssertionError: 200 != 500
I checked a testOOoStyle's failure. Because Kazuhiko reported me the
failure appears since my change rev.28842. Then I got strange result.
(I will check why it works until my change.)
The core reason of the failure is UnicodeError with None at
report_view of ODS style. And getTitle() must return a valid string.
<tal:block tal:condition="sheet_per_reportsection">
<tal:block tal:repeat="report_item python: report_item_list">
<tal:block tal:condition="python: report_item.getFormId()">
Here -> <table:table tal:attributes="table:name python: unicode(report_item.getTitle(), 'utf-8')">
<tal:block metal:use-macro="here/report_view/macros/make_report_item_table"/>
</table:table>
</tal:block>
</tal:block>
</tal:block>
Then I checked the render_method Base_getWorkflowHistorySectionList,
which returns list of ReportSection. At rev.28842, title of
ReportSection is not set. So the getTitle returns None. But the
title is not set since rev.14454.
http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getWorkflowHistorySectionList.xml?r1=14454&r2=11320
Also he reported that the test is passed when he changed Base_viewHistory to rev28841.
I don't have any idea now. Do you have?
More information about the Erp5-dev
mailing list