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

testItem: re-enable some newSimulationExpectedFailure tests

Just use erp5_default_business_process as specialise so that expand does
not fail and we can still have item management tested until test suite
is fully updated for new simulation.

More complex tests that deals with divergence are left as
newSimulationExpectedFailure for now.
parent a1cf5e48
Pipeline #560 failed with stage
...@@ -113,6 +113,7 @@ class TestItemMixin(TestSaleInvoiceMixin): ...@@ -113,6 +113,7 @@ class TestItemMixin(TestSaleInvoiceMixin):
title = "PPL%s" % pac_list.getId(), title = "PPL%s" % pac_list.getId(),
start_date = self.datetime + 20, start_date = self.datetime + 20,
stop_date = self.datetime + 10, stop_date = self.datetime + 10,
specialise_value = portal.business_process_module.erp5_default_business_process,
) )
if organisation is not None: if organisation is not None:
...@@ -904,7 +905,6 @@ class TestItem(TestItemMixin, ERP5TypeTestCase): ...@@ -904,7 +905,6 @@ class TestItem(TestItemMixin, ERP5TypeTestCase):
self.assertEqual(12, packing_list_line.getQuantity()) self.assertEqual(12, packing_list_line.getQuantity())
@newSimulationExpectedFailure
def test_select_item_dialog_variation(self): def test_select_item_dialog_variation(self):
organisation = self.createOrganisation(title='Organisation IV') organisation = self.createOrganisation(title='Organisation IV')
resource = self.createVariatedResource() resource = self.createVariatedResource()
...@@ -1039,6 +1039,7 @@ class TestItemScripts(ERP5TypeTestCase): ...@@ -1039,6 +1039,7 @@ class TestItemScripts(ERP5TypeTestCase):
source_section_value=self.mirror_section, source_section_value=self.mirror_section,
destination_value=self.node, destination_value=self.node,
destination_section_value=self.section, destination_section_value=self.section,
specialise_value=self.portal.business_process_module.erp5_default_business_process,
start_date=DateTime() - 1,) start_date=DateTime() - 1,)
line = packing_list.newContent( line = packing_list.newContent(
portal_type='Sale Packing List Line', portal_type='Sale Packing List Line',
...@@ -1051,7 +1052,6 @@ class TestItemScripts(ERP5TypeTestCase): ...@@ -1051,7 +1052,6 @@ class TestItemScripts(ERP5TypeTestCase):
return line return line
# with line # with line
@newSimulationExpectedFailure
def test_Item_getResourceValue(self): def test_Item_getResourceValue(self):
self.assertEqual(None, self.item.Item_getResourceValue()) self.assertEqual(None, self.item.Item_getResourceValue())
line = self._makeSalePackingListLine() line = self._makeSalePackingListLine()
...@@ -1059,7 +1059,6 @@ class TestItemScripts(ERP5TypeTestCase): ...@@ -1059,7 +1059,6 @@ class TestItemScripts(ERP5TypeTestCase):
self.assertEqual(None, self.item.Item_getResourceValue( self.assertEqual(None, self.item.Item_getResourceValue(
at_date=DateTime() - 2)) at_date=DateTime() - 2))
@newSimulationExpectedFailure
def test_Item_getResourceTitle(self): def test_Item_getResourceTitle(self):
self.assertEqual(None, self.item.Item_getResourceTitle()) self.assertEqual(None, self.item.Item_getResourceTitle())
line = self._makeSalePackingListLine() line = self._makeSalePackingListLine()
...@@ -1067,7 +1066,6 @@ class TestItemScripts(ERP5TypeTestCase): ...@@ -1067,7 +1066,6 @@ class TestItemScripts(ERP5TypeTestCase):
self.assertEqual(None, self.item.Item_getResourceTitle( self.assertEqual(None, self.item.Item_getResourceTitle(
at_date=DateTime() - 2)) at_date=DateTime() - 2))
@newSimulationExpectedFailure
def test_Item_getCurrentOwnerValue(self): def test_Item_getCurrentOwnerValue(self):
self.assertEqual(None, self.item.Item_getCurrentOwnerValue()) self.assertEqual(None, self.item.Item_getCurrentOwnerValue())
line = self._makeSalePackingListLine() line = self._makeSalePackingListLine()
...@@ -1075,7 +1073,6 @@ class TestItemScripts(ERP5TypeTestCase): ...@@ -1075,7 +1073,6 @@ class TestItemScripts(ERP5TypeTestCase):
self.assertEqual(None, self.assertEqual(None,
self.item.Item_getCurrentOwnerValue(at_date=DateTime() - 2)) self.item.Item_getCurrentOwnerValue(at_date=DateTime() - 2))
@newSimulationExpectedFailure
def test_Item_getCurrentOwnerTitle(self): def test_Item_getCurrentOwnerTitle(self):
self.assertEqual(None, self.item.Item_getCurrentOwnerTitle()) self.assertEqual(None, self.item.Item_getCurrentOwnerTitle())
line = self._makeSalePackingListLine() line = self._makeSalePackingListLine()
...@@ -1083,7 +1080,6 @@ class TestItemScripts(ERP5TypeTestCase): ...@@ -1083,7 +1080,6 @@ class TestItemScripts(ERP5TypeTestCase):
self.assertEqual(None, self.assertEqual(None,
self.item.Item_getCurrentOwnerTitle(at_date=DateTime() - 2)) self.item.Item_getCurrentOwnerTitle(at_date=DateTime() - 2))
@newSimulationExpectedFailure
def test_Item_getCurrentSiteValue(self): def test_Item_getCurrentSiteValue(self):
self.assertEqual(None, self.item.Item_getCurrentSiteValue()) self.assertEqual(None, self.item.Item_getCurrentSiteValue())
line = self._makeSalePackingListLine() line = self._makeSalePackingListLine()
...@@ -1091,7 +1087,6 @@ class TestItemScripts(ERP5TypeTestCase): ...@@ -1091,7 +1087,6 @@ class TestItemScripts(ERP5TypeTestCase):
self.assertEqual(None, self.item.Item_getCurrentSiteValue( self.assertEqual(None, self.item.Item_getCurrentSiteValue(
at_date=DateTime() - 2)) at_date=DateTime() - 2))
@newSimulationExpectedFailure
def test_Item_getCurrentSiteTitle(self): def test_Item_getCurrentSiteTitle(self):
self.assertEqual(None, self.item.Item_getCurrentSiteTitle()) self.assertEqual(None, self.item.Item_getCurrentSiteTitle())
line = self._makeSalePackingListLine() line = self._makeSalePackingListLine()
...@@ -1108,6 +1103,7 @@ class TestItemScripts(ERP5TypeTestCase): ...@@ -1108,6 +1103,7 @@ class TestItemScripts(ERP5TypeTestCase):
source_section_value=self.mirror_section, source_section_value=self.mirror_section,
destination_value=self.node, destination_value=self.node,
destination_section_value=self.section, destination_section_value=self.section,
specialise_value=self.portal.business_process_module.erp5_default_business_process,
start_date=DateTime() - 1,) start_date=DateTime() - 1,)
line = packing_list.newContent( line = packing_list.newContent(
portal_type='Sale Packing List Line', portal_type='Sale Packing List Line',
...@@ -1124,7 +1120,6 @@ class TestItemScripts(ERP5TypeTestCase): ...@@ -1124,7 +1120,6 @@ class TestItemScripts(ERP5TypeTestCase):
packing_list.deliver() packing_list.deliver()
return cell return cell
@newSimulationExpectedFailure
def test_Item_getVariationCategoryList(self): def test_Item_getVariationCategoryList(self):
self.assertEqual([], self.item.Item_getVariationCategoryList()) self.assertEqual([], self.item.Item_getVariationCategoryList())
self._makeSalePackingListCellWithVariation() self._makeSalePackingListCellWithVariation()
...@@ -1132,7 +1127,6 @@ class TestItemScripts(ERP5TypeTestCase): ...@@ -1132,7 +1127,6 @@ class TestItemScripts(ERP5TypeTestCase):
self.assertEqual([], self.assertEqual([],
self.item.Item_getVariationCategoryList(at_date=DateTime() - 2)) self.item.Item_getVariationCategoryList(at_date=DateTime() - 2))
@newSimulationExpectedFailure
def test_Item_getVariationRangeCategoryItemList(self): def test_Item_getVariationRangeCategoryItemList(self):
self.assertEqual([], self.item.Item_getVariationRangeCategoryItemList()) self.assertEqual([], self.item.Item_getVariationRangeCategoryItemList())
self._makeSalePackingListCellWithVariation() self._makeSalePackingListCellWithVariation()
......
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