Commit a9d07617 authored by Jérome Perrin's avatar Jérome Perrin

set sections in setOrderProfile. turns some _print into LOG


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5240 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d91a31e2
...@@ -314,15 +314,15 @@ class TestOrderMixin: ...@@ -314,15 +314,15 @@ class TestOrderMixin:
order_line_vcl = [] order_line_vcl = []
resource_vbcl = resource.getVariationBaseCategoryList() resource_vbcl = resource.getVariationBaseCategoryList()
for vbc in resource_vbcl: for vbc in resource_vbcl:
ZopeTestCase._print('\n') LOG('stepSetOrderLineHalfVCL', 0, 'vbc: %s' % str(vbc))
ZopeTestCase._print('vbc: %s' % str(vbc))
resource_vcl = list(resource.getVariationCategoryList( resource_vcl = list(resource.getVariationCategoryList(
base_category_list=[vbc], base_category_list=[vbc],
omit_individual_variation=0)) omit_individual_variation=0))
ZopeTestCase._print('resource_vcl: %s' % str(resource_vcl)) LOG('stepSetOrderLineHalfVCL', 0,
'resource_vcl: %s' % str(resource_vcl))
resource_vcl.sort() resource_vcl.sort()
ZopeTestCase._print('split resource_vcl: %s' %\ LOG('stepSetOrderLineHalfVCL', 0, 'split resource_vcl: %s' %
str(self.splitList(resource_vcl)[0])) str(self.splitList(resource_vcl)[0]))
order_line_vcl.extend(self.splitList(resource_vcl)[0]) order_line_vcl.extend(self.splitList(resource_vcl)[0])
order_line.setVariationCategoryList(order_line_vcl) order_line.setVariationCategoryList(order_line_vcl)
...@@ -435,9 +435,8 @@ class TestOrderMixin: ...@@ -435,9 +435,8 @@ class TestOrderMixin:
order_line = sequence.get('order_line') order_line = sequence.get('order_line')
vcl = order_line.getVariationCategoryList() vcl = order_line.getVariationCategoryList()
vcil = order_line.getVariationCategoryItemList() vcil = order_line.getVariationCategoryItemList()
ZopeTestCase._print('\n') LOG('stepCheckOrderLineVCIL', 0, 'vcl: %s\n' % str(vcl))
ZopeTestCase._print('vcl: %s\n' % str(vcl)) LOG('stepCheckOrderLineVCIL', 0, 'vcil: %s\n' % str(vcil))
ZopeTestCase._print('vcil: %s\n' % str(vcil))
self.failIfDifferentSet(vcl, map(lambda x: x[1], vcil)) self.failIfDifferentSet(vcl, map(lambda x: x[1], vcil))
def stepSetOrderLineDefaultValues(self, sequence=None, \ def stepSetOrderLineDefaultValues(self, sequence=None, \
...@@ -646,9 +645,8 @@ class TestOrderMixin: ...@@ -646,9 +645,8 @@ class TestOrderMixin:
if order_state in no_applied_rule_state: if order_state in no_applied_rule_state:
self.assertEquals(0, len(related_applied_rule_list)) self.assertEquals(0, len(related_applied_rule_list))
else: else:
# ZopeTestCase._print('\n') LOG('stepCheckOrderSimulation', 0, 'related_applied_rule_list: %s' %
# ZopeTestCase._print('related_applied_rule_list: %s' %\ str([x.getObject() for x in related_applied_rule_list]))
# str([x.getObject() for x in related_applied_rule_list]))
self.assertEquals(1, len(related_applied_rule_list)) self.assertEquals(1, len(related_applied_rule_list))
applied_rule = related_applied_rule_list[0].getObject() applied_rule = related_applied_rule_list[0].getObject()
sequence.edit(applied_rule=applied_rule) sequence.edit(applied_rule=applied_rule)
...@@ -765,8 +763,10 @@ class TestOrderMixin: ...@@ -765,8 +763,10 @@ class TestOrderMixin:
organisation1 = sequence.get('organisation1') organisation1 = sequence.get('organisation1')
organisation2 = sequence.get('organisation2') organisation2 = sequence.get('organisation2')
order = sequence.get('order') order = sequence.get('order')
order.edit(source_value=organisation1, order.edit( source_value = organisation1,
destination_value=organisation2) source_section_value = organisation1,
destination_value = organisation2,
destination_section_value = organisation2 )
def stepCheckDeliveryBuilding(self, sequence=None, sequence_list=None, **kw): def stepCheckDeliveryBuilding(self, sequence=None, sequence_list=None, **kw):
""" """
......
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