Commit 6a7501bc authored by Vincent Pelletier's avatar Vincent Pelletier

testTradeReports: "All" section is not a feature.

Mixing states from unrelated workflows produces output which becomes hard
to understand. As a result, it was removed from Folder_viewWorkflowReport
and must not be expected by test.
Also, because of implementation detail, section order changed, so update
indices.
parent 530ffd79
......@@ -1194,35 +1194,25 @@ class TestTradeReports(ERP5ReportTestCase):
get_value('default',
render_format='list', REQUEST=self.portal.REQUEST)
data_line_list = [l for l in line_list if l.isDataLine()]
self.assertEqual(8, len(data_line_list))
self.assertEqual(5, len(data_line_list))
order_workflow_name = 'Sale Order - Order Workflow'
causality_workflow_name = 'Sale Order - Causality Workflow'
self.checkLineProperties(data_line_list[0],
self.checkLineProperties(data_line_list[2],
translated_portal_type=order_workflow_name)
self.checkLineProperties(data_line_list[1],
self.checkLineProperties(data_line_list[3],
translated_portal_type='',
state='Cancelled',
count=1)
self.checkLineProperties(data_line_list[2],
self.checkLineProperties(data_line_list[4],
translated_portal_type='',
state='Draft',
count=2)
self.checkLineProperties(data_line_list[3],
self.checkLineProperties(data_line_list[0],
translated_portal_type=causality_workflow_name)
self.checkLineProperties(data_line_list[4],
self.checkLineProperties(data_line_list[1],
translated_portal_type='',
state='Draft',
count=3)
self.checkLineProperties(data_line_list[5],
translated_portal_type='All')
self.checkLineProperties(data_line_list[6],
translated_portal_type='',
state='Cancelled',
count=1)
self.checkLineProperties(data_line_list[7],
translated_portal_type='',
state='Draft',
count=5)
def test_suite():
......
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