diff --git a/product/ERP5/tests/testAdvancedInvoicing.py b/product/ERP5/tests/testAdvancedInvoicing.py index 8a65536292f3a3240b84c44ed57fdcbf5a64bbaf..e8553a5ffaa531179351178aeffe9f10659f58ad 100644 --- a/product/ERP5/tests/testAdvancedInvoicing.py +++ b/product/ERP5/tests/testAdvancedInvoicing.py @@ -38,6 +38,7 @@ from AccessControl.SecurityManagement import newSecurityManager from DateTime import DateTime from Products.ERP5Type.tests.Sequence import SequenceList from Products.ERP5.tests.testInvoice import TestSaleInvoiceMixin +from Products.ERP5.tests.utils import newSimulationExpectedFailure class TestAdvancedInvoice(TestSaleInvoiceMixin, ERP5TypeTestCase): """Test methods for sale and purchase invoice. @@ -299,7 +300,8 @@ class TestAdvancedInvoice(TestSaleInvoiceMixin, ERP5TypeTestCase): packing_list = sequence.get('packing_list') self.assertEquals([], packing_list.getDivergenceList()) self.assertEquals('solved', packing_list.getCausalityState()) - + + @newSimulationExpectedFailure def test_AdoptQuantityDivergenceOnInvoiceLineWithStoppedPackingList(self, quiet=quiet, run=RUN_ALL_TESTS): """Adopt quantity with stopped packing list""" @@ -557,6 +559,7 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice): """ self.playSequence(sequence, quiet=quiet) + @newSimulationExpectedFailure def test_04_InvoiceChangeStartDateFail(self, quiet=quiet, run=RUN_ALL_TESTS): """ Change the start_date of a Invoice Line, @@ -992,7 +995,7 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice): """) sequence_list.play(self, quiet=quiet) - + @newSimulationExpectedFailure def test_13_acceptQuantityDivergenceOnInvoiceWithStartedPackingList( self, quiet=quiet, run=RUN_ALL_TESTS): if not run: return diff --git a/product/ERP5/tests/testBPMCore.py b/product/ERP5/tests/testBPMCore.py index 4ace3ef1a37f9db9f12422f9d7b69fb1adb962d1..3d56be4af718376819f58e9e72df77056309e344 100644 --- a/product/ERP5/tests/testBPMCore.py +++ b/product/ERP5/tests/testBPMCore.py @@ -34,6 +34,7 @@ import transaction from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from DateTime import DateTime from Products.ERP5Type.tests.utils import createZODBPythonScript, reindex +from Products.ERP5.tests.utils import newSimulationExpectedFailure class TestBPMMixin(ERP5TypeTestCase): """Skeletons for tests which depend on BPM""" @@ -193,6 +194,7 @@ class TestBPMMixin(ERP5TypeTestCase): class TestBPMImplementation(TestBPMMixin): """Business Process implementation tests""" + @newSimulationExpectedFailure def test_BusinessProcess_getPathValueList(self): business_process = self.createBusinessProcess() @@ -247,6 +249,7 @@ class TestBPMImplementation(TestBPMMixin): self.assertEquals('something', business_link.getSource(default='something')) + @newSimulationExpectedFailure def test_BuinessPathDynamicCategoryAccessProvider(self): source_node = self.portal.organisation_module.newContent( portal_type='Organisation') @@ -266,6 +269,7 @@ class TestBPMImplementation(TestBPMMixin): self.assertEquals(source_node.getRelativeUrl(), business_link.getSource(context=context_movement, default='something')) + @newSimulationExpectedFailure def test_BuinessPathDynamicCategoryAccessProviderBusinessLinkPrecedence(self): movement_node = self.portal.organisation_module.newContent( portal_type='Organisation') @@ -283,6 +287,7 @@ class TestBPMImplementation(TestBPMMixin): self.assertEquals([path_node], business_link.getSourceValueList(context=context_movement)) + @newSimulationExpectedFailure def test_BuinessPathDynamicCategoryAccessProviderEmptyMovement(self): business_link = self.createBusinessLink() business_link.setSourceMethodId('BusinessLink_getDefaultSourceList') @@ -296,6 +301,7 @@ class TestBPMImplementation(TestBPMMixin): self.assertEquals('something', business_link.getSource(context=context_movement, default='something')) + @newSimulationExpectedFailure def test_BusinessState_getRemainingTradePhaseList(self): """ This test case is described for what trade_phase is remaining after the state. @@ -419,6 +425,7 @@ class TestBPMImplementation(TestBPMMixin): trade_phase_list=['default/delivery', 'default/accounting']))) + @newSimulationExpectedFailure def test_BusinessLink_calculateExpectedDate(self): """ This test case is described for what start/stop date is expected on @@ -865,6 +872,7 @@ class TestBPMisBuildableImplementation(TestBPMDummyDeliveryMovementMixin): self.assertEquals(compensated_simulation_movement.isBuildable(), False) class TestBPMisCompletedImplementation(TestBPMDummyDeliveryMovementMixin): + @newSimulationExpectedFailure def test_isCompleted_OrderedDeliveredInvoiced(self): """Test isCompleted for ordered, delivered and invoiced sequence""" self._createOrderedDeliveredInvoicedBusinessProcess() @@ -968,6 +976,7 @@ class TestBPMisCompletedImplementation(TestBPMDummyDeliveryMovementMixin): self.assertEqual(self.invoice_path.isCompleted(delivery), False) self.assertEqual(self.invoice_path.isPartiallyCompleted(delivery), False) + @newSimulationExpectedFailure def test_isCompleted_OrderedInvoicedDelivered(self): """Test isCompleted for ordered, invoiced and invoiced sequence""" self._createOrderedInvoicedDeliveredBusinessProcess() diff --git a/product/ERP5/tests/testConversionInSimulation.py b/product/ERP5/tests/testConversionInSimulation.py index a99176855193ae29ea47abe83277185a9df50e3c..7384ef09dc4f047678c36054867c89987ae3da32 100644 --- a/product/ERP5/tests/testConversionInSimulation.py +++ b/product/ERP5/tests/testConversionInSimulation.py @@ -34,6 +34,7 @@ from zLOG import LOG from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod from Testing import ZopeTestCase from Products.ERP5.tests.testAccounting import AccountingTestCase +from Products.ERP5.tests.utils import newSimulationExpectedFailure from AccessControl.SecurityManagement import newSecurityManager QUIET = False run_all_test = True @@ -390,7 +391,7 @@ class TestConversionInSimulation(AccountingTestCase): (invoice_transaction_movement.getDestinationTotalAssetPrice(), None) - + @newSimulationExpectedFailure def test_01_destination_total_asset_price_on_accounting_lines(self,quiet=0, run=run_all_test): """ @@ -479,8 +480,7 @@ class TestConversionInSimulation(AccountingTestCase): self.assertEquals(line.getDestinationTotalAssetPrice(), round(655.957*delivery_movement.getTotalPrice())) - - + @newSimulationExpectedFailure def test_01_diverged_sale_packing_list_destination_total_asset_price( self,quiet=0,run=run_all_test): """ @@ -687,6 +687,7 @@ class TestConversionInSimulation(AccountingTestCase): getSourceTotalAssetPrice(), old_source_asset_price *(3.0/5.0)) + @newSimulationExpectedFailure def test_01_delivery_mode_on_sale_packing_list_and_invoice( self,quiet=0,run=run_all_test): """ @@ -774,6 +775,7 @@ class TestConversionInSimulation(AccountingTestCase): self.assertEquals(related_invoice.getIncoterm(), order.getIncoterm()) + @newSimulationExpectedFailure def test_01_quantity_unit_on_sale_packing_list( self,quiet=0,run=run_all_test): """ diff --git a/product/ERP5/tests/testDivergenceTester.py b/product/ERP5/tests/testDivergenceTester.py index 8a9c95778ea6f72159901af895df87a47aa39cb8..2f050b718ec5efd42bfd41d984c69b03239522bc 100644 --- a/product/ERP5/tests/testDivergenceTester.py +++ b/product/ERP5/tests/testDivergenceTester.py @@ -31,6 +31,7 @@ import transaction from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.Sequence import SequenceList from Products.ERP5.tests.testPackingList import TestPackingListMixin +from Products.ERP5.tests.utils import newSimulationExpectedFailure class TestDivergenceTester(TestPackingListMixin, ERP5TypeTestCase): """ @@ -148,6 +149,7 @@ class TestDivergenceTester(TestPackingListMixin, ERP5TypeTestCase): rule = sequence.get('rule') rule.newContent(portal_type='Quantity Divergence Tester') + @newSimulationExpectedFailure def test_01_QuantityDivergenceTester(self, quiet=quiet, run=run_all_test): """ Test the quantity divergence tester @@ -203,6 +205,7 @@ class TestDivergenceTester(TestPackingListMixin, ERP5TypeTestCase): packing_list = sequence.get('packing_list') packing_list.setSource(sim_mvt.getSource()) + @newSimulationExpectedFailure def test_02_CategoryDivergenceTester(self, quiet=quiet, run=run_all_test): """ Test the category divergence tester @@ -260,6 +263,7 @@ class TestDivergenceTester(TestPackingListMixin, ERP5TypeTestCase): packing_list = sequence.get('packing_list') packing_list.setStartDate(sim_mvt.getStartDate()) + @newSimulationExpectedFailure def test_03_PropertyDivergenceTester(self, quiet=quiet, run=run_all_test): """ Test the property divergence tester @@ -309,6 +313,7 @@ class TestDivergenceTester(TestPackingListMixin, ERP5TypeTestCase): movement = sequence.get('movement') movement.setAggregate(None) + @newSimulationExpectedFailure def test_04_CategoryDivergenceTester(self, quiet=quiet, run=run_all_test): """ Test the category divergence tester @@ -332,6 +337,7 @@ class TestDivergenceTester(TestPackingListMixin, ERP5TypeTestCase): sequence_list.addSequenceString(sequence_string) sequence_list.play(self, quiet=self.quiet) + @newSimulationExpectedFailure def test_QuantityDivergenceTesterCompareMethod(self): rule = self.portal.portal_rules.newContent(portal_type='Delivery Rule') divergence_tester = rule.newContent(portal_type='Quantity Divergence Tester') diff --git a/product/ERP5/tests/testERP5Commerce.py b/product/ERP5/tests/testERP5Commerce.py index 7995eedecf4732d56e63e9f5dafb1b85c2b0eb44..565e96ab559ad083e15fb15ec0ed6850c0886673 100644 --- a/product/ERP5/tests/testERP5Commerce.py +++ b/product/ERP5/tests/testERP5Commerce.py @@ -34,6 +34,7 @@ import urllib from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.utils import FileUpload +from Products.ERP5.tests.utils import newSimulationExpectedFailure SESSION_ID = "12345678" LANGUAGE_LIST = ('en', 'fr', 'de', 'bg',) @@ -590,6 +591,7 @@ class TestCommerce(ERP5TypeTestCase): # Check if the Shopping Cart is empty self.assertEquals(0, len(self.website.SaleOrder_getShoppingCartItemList())) + @newSimulationExpectedFailure def test_11_finalizeShopping(self): """ Test the SaleOrder_finalizeShopping script @@ -681,6 +683,7 @@ class TestCommerce(ERP5TypeTestCase): self.assertEquals(currency.getShortTitle(), self.website.WebSite_getShoppingCartDefaultCurrencySymbol()) + @newSimulationExpectedFailure def test_16_simulatePaypalPayment(self): """ Test all the scripts related to paypal @@ -919,6 +922,7 @@ class TestCommerce(ERP5TypeTestCase): self.assertEquals(product.Resource_getShopUrl(), '%s/%s' % (product.getRelativeUrl(), 'Resource_viewAsShop')) + @newSimulationExpectedFailure def test_28_finalizeShoppingWithComment(self): """ Testing if the comment added during the checkout will be set on the sale diff --git a/product/ERP5/tests/testInvoice.py b/product/ERP5/tests/testInvoice.py index 9870bfecfa4a4358120347978079f21bb2c3880f..14191d3f6c530ab8469e7f6e9e61dbde9d1e21ae 100644 --- a/product/ERP5/tests/testInvoice.py +++ b/product/ERP5/tests/testInvoice.py @@ -42,6 +42,7 @@ from Acquisition import aq_parent from zLOG import LOG from Products.ERP5Type.tests.Sequence import SequenceList from testPackingList import TestPackingListMixin +from Products.ERP5.tests.utils import newSimulationExpectedFailure class TestInvoiceMixin(TestPackingListMixin): """Test methods for invoices @@ -1210,7 +1211,7 @@ class TestInvoice(TestInvoiceMixin): self.assertEquals(currency, delivery_movement.getPriceCurrencyValue()) - + @newSimulationExpectedFailure def test_modify_planned_order_invoicing_rule(self): """ tests that modifying a planned order affects movements from invoicing @@ -1414,6 +1415,7 @@ class TestInvoice(TestInvoiceMixin): self.assertEquals(DateTime(2002, 03, 04), invoice_movement.getStopDate()) + @newSimulationExpectedFailure def test_modify_planned_order_invoice_transaction_rule(self): """ tests that modifying a planned order affects movements from invoice @@ -2712,6 +2714,7 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase): """) sequence_list.play(self, quiet=quiet) + @newSimulationExpectedFailure def test_07_InvoiceAddPackingListLine(self, quiet=quiet): """ Checks that adding a Packing List Line still creates a correct @@ -2778,6 +2781,7 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase): """ self.playSequence(sequence, quiet=quiet) + @newSimulationExpectedFailure def test_09_InvoiceChangeStartDateFail(self, quiet=quiet): """ Change the start_date of a Invoice Line, @@ -2819,6 +2823,7 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase): """ self.playSequence(sequence, quiet=quiet) + @newSimulationExpectedFailure def test_09b_InvoiceChangeStartDateSucceed(self, quiet=quiet): """ Change the start_date of a Invoice Line, diff --git a/product/ERP5/tests/testItem.py b/product/ERP5/tests/testItem.py index 911e8ea847d40dbca9eb60babf00096294dfb3b6..cb1af8102c7a50201a76ea6ee1bbf35c15f9629b 100644 --- a/product/ERP5/tests/testItem.py +++ b/product/ERP5/tests/testItem.py @@ -35,6 +35,8 @@ from Products.ERP5Type.tests.utils import reindex from AccessControl.SecurityManagement import newSecurityManager from Products.ERP5Type.tests.Sequence import SequenceList from Products.ERP5.tests.testInvoice import TestSaleInvoiceMixin +from Products.ERP5.tests.utils import newSimulationExpectedFailure + class TestItemMixin(TestSaleInvoiceMixin): item_portal_type = 'Item' @@ -614,7 +616,8 @@ class TestItem(TestItemMixin, ERP5TypeTestCase): movement_cell_list = packing_list_line.contentValues( portal_type='Purchase Packing List Cell') self.assertEquals(movement_cell_list,[]) - + + @newSimulationExpectedFailure def test_06_VerifyHavingSameItemTwiceOnMovementCausesNoBug(self): """ """ @@ -704,6 +707,7 @@ class TestItem(TestItemMixin, ERP5TypeTestCase): sequence_list.addSequenceString(sequence_string) sequence_list.play(self, quiet=quiet) + @newSimulationExpectedFailure def test_09_ChangeOrderDateAndAcceptOnPackingList(self, quiet=quiet, run=run_all_test): """ Create order and add items, then Change the order date @@ -765,6 +769,7 @@ class TestItem(TestItemMixin, ERP5TypeTestCase): sequence_list.addSequenceString(sequence_string) sequence_list.play(self, quiet=quiet) + @newSimulationExpectedFailure def test_12_CreteSameResourceDifferentItemOrderLines(self, quiet=quiet, run=run_all_test): """ Create order lines with same resouces and add items into them, then Change the quantity @@ -786,6 +791,7 @@ class TestItem(TestItemMixin, ERP5TypeTestCase): sequence_list.addSequenceString(sequence_string) sequence_list.play(self, quiet=quiet) + @newSimulationExpectedFailure def test_13_CreateSameResourceDiffrentItemOrderLinesThenChangeTheOrderLinesDate( self, quiet=quiet, run=run_all_test): sequence_list = SequenceList() @@ -912,6 +918,7 @@ class TestItem(TestItemMixin, ERP5TypeTestCase): self.assertEquals(12, packing_list_line.getQuantity()) + @newSimulationExpectedFailure def test_select_item_dialog_variation(self): organisation = self.createOrganisation(title='Organisation IV') resource = self.createVariatedResource() @@ -1060,6 +1067,7 @@ class TestItemScripts(ERP5TypeTestCase): return line # with line + @newSimulationExpectedFailure def test_Item_getResourceValue(self): self.assertEquals(None, self.item.Item_getResourceValue()) line = self._makeSalePackingListLine() @@ -1067,6 +1075,7 @@ class TestItemScripts(ERP5TypeTestCase): self.assertEquals(None, self.item.Item_getResourceValue( at_date=DateTime() - 2)) + @newSimulationExpectedFailure def test_Item_getResourceTitle(self): self.assertEquals(None, self.item.Item_getResourceTitle()) line = self._makeSalePackingListLine() @@ -1074,6 +1083,7 @@ class TestItemScripts(ERP5TypeTestCase): self.assertEquals(None, self.item.Item_getResourceTitle( at_date=DateTime() - 2)) + @newSimulationExpectedFailure def test_Item_getCurrentOwnerValue(self): self.assertEquals(None, self.item.Item_getCurrentOwnerValue()) line = self._makeSalePackingListLine() @@ -1081,6 +1091,7 @@ class TestItemScripts(ERP5TypeTestCase): self.assertEquals(None, self.item.Item_getCurrentOwnerValue(at_date=DateTime() - 2)) + @newSimulationExpectedFailure def test_Item_getCurrentOwnerTitle(self): self.assertEquals(None, self.item.Item_getCurrentOwnerTitle()) line = self._makeSalePackingListLine() @@ -1088,6 +1099,7 @@ class TestItemScripts(ERP5TypeTestCase): self.assertEquals(None, self.item.Item_getCurrentOwnerTitle(at_date=DateTime() - 2)) + @newSimulationExpectedFailure def test_Item_getCurrentSiteValue(self): self.assertEquals(None, self.item.Item_getCurrentSiteValue()) line = self._makeSalePackingListLine() @@ -1095,6 +1107,7 @@ class TestItemScripts(ERP5TypeTestCase): self.assertEquals(None, self.item.Item_getCurrentSiteValue( at_date=DateTime() - 2)) + @newSimulationExpectedFailure def test_Item_getCurrentSiteTitle(self): self.assertEquals(None, self.item.Item_getCurrentSiteTitle()) line = self._makeSalePackingListLine() @@ -1127,6 +1140,7 @@ class TestItemScripts(ERP5TypeTestCase): packing_list.deliver() return cell + @newSimulationExpectedFailure def test_Item_getVariationCategoryList(self): self.assertEquals([], self.item.Item_getVariationCategoryList()) self._makeSalePackingListCellWithVariation() @@ -1134,6 +1148,7 @@ class TestItemScripts(ERP5TypeTestCase): self.assertEquals([], self.item.Item_getVariationCategoryList(at_date=DateTime() - 2)) + @newSimulationExpectedFailure def test_Item_getVariationRangeCategoryItemList(self): self.assertEquals([], self.item.Item_getVariationRangeCategoryItemList()) self._makeSalePackingListCellWithVariation() diff --git a/product/ERP5/tests/testMRP.py b/product/ERP5/tests/testMRP.py index c0d3caff96023edb090c88d63888d31183d3f578..0b966039f758001b31f321e605a10e267bd68318 100644 --- a/product/ERP5/tests/testMRP.py +++ b/product/ERP5/tests/testMRP.py @@ -37,6 +37,7 @@ from Products.ERP5Type.tests.utils import reindex from Products.ERP5.tests.testBPMCore import TestBPMMixin from Products.ERP5Type.tests.backportUnittest import skip +from Products.ERP5.tests.utils import newSimulationExpectedFailure class TestMRPMixin(TestBPMMixin): transformation_portal_type = 'Transformation' @@ -247,6 +248,7 @@ class TestMRPImplementation(TestMRPMixin): self.assertEquals(set([business_process.p2, business_process.p3]), set(rule.getHeadProductionPathList(transformation, business_process))) + @newSimulationExpectedFailure def test_TransformationRule_expand(self): # mock order order = self.createDefaultOrder() diff --git a/product/ERP5/tests/testPackingList.py b/product/ERP5/tests/testPackingList.py index 544977ae66af4cf3e0513cb8f82970a15085b417..538950c166b919e7fa0dfb10f9501e7621ac013e 100644 --- a/product/ERP5/tests/testPackingList.py +++ b/product/ERP5/tests/testPackingList.py @@ -37,6 +37,7 @@ from Products.ERP5Type.tests.Sequence import SequenceList from testOrder import TestOrderMixin from DateTime import DateTime from Products.ERP5Type.Globals import PersistentMapping +from Products.ERP5.tests.utils import newSimulationExpectedFailure class TestPackingListMixin(TestOrderMixin): """ @@ -1157,6 +1158,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) : # This test does not work as it is because of the different behaviour of # Adopt Solver. + @newSimulationExpectedFailure def test_05d_SimulationChangeResourceOnOneSimulationMovementForMergedLine(self, quiet=quiet, run=run_all_test): if not run: return sequence_list = SequenceList() @@ -1196,6 +1198,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) : sequence_list.play(self, quiet=quiet) + @newSimulationExpectedFailure def test_05f_SimulationChangeAndPartialAcceptDecision(self, quiet=quiet, run=run_all_test): if not run: return sequence_list = SequenceList() @@ -1228,6 +1231,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) : # an applied rule which with the new simulation structure is not the same as # in the original test packing list. + @newSimulationExpectedFailure def test_06_SimulationChangeStartDate(self, quiet=quiet, run=run_all_test): if not run: return sequence_list = SequenceList() @@ -1247,6 +1251,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) : sequence_list.play(self, quiet=quiet) + @newSimulationExpectedFailure def test_07_SimulationChangeStartDateWithTwoOrderLine(self, quiet=quiet, run=run_all_test): if not run: return sequence_list = SequenceList() @@ -1268,6 +1273,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) : sequence_list.play(self, quiet=quiet) + @newSimulationExpectedFailure def test_07a_SimulationChangeStartDateWithTwoOrderLine(self, quiet=quiet, run=run_all_test): if not run: return sequence_list = SequenceList() @@ -1309,6 +1315,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) : sequence_list.play(self, quiet=quiet) + @newSimulationExpectedFailure def test_09_AddContainersWithVariatedResources(self, quiet=quiet, run=run_all_test): if not run: return sequence_list = SequenceList() @@ -1365,6 +1372,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) : sequence_list.play(self, quiet=quiet) + @newSimulationExpectedFailure def test_11_PackingListDecreaseTwoTimesQuantityAndUpdateDelivery(self, quiet=quiet, run=run_all_test): """ @@ -1656,6 +1664,7 @@ class TestPackingList(TestPackingListMixin, ERP5TypeTestCase) : sequence_list.play(self, quiet=quiet) + @newSimulationExpectedFailure def test_19_ChangeResourceOnPackingListAndOrder(self, quiet=quiet): """ Change the resource on a packing list line, and accept the diff --git a/product/ERP5/tests/testTaskReportDivergence.py b/product/ERP5/tests/testTaskReportDivergence.py index fe03391fe282bc42ac70133ae4d92c6b5d2268c5..01f0d5e485eb024cf92f8ae908a681367e9e5dd0 100644 --- a/product/ERP5/tests/testTaskReportDivergence.py +++ b/product/ERP5/tests/testTaskReportDivergence.py @@ -32,6 +32,7 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.Sequence import SequenceList from testTask import TestTaskMixin from Products.ERP5Type.tests.backportUnittest import expectedFailure +from Products.ERP5.tests.utils import newSimulationExpectedFailure class TestTaskReportDivergenceMixin(TestTaskMixin): """ @@ -149,7 +150,8 @@ class TestTaskReportDivergence(TestTaskReportDivergenceMixin, ERP5TypeTestCase) Return if we should create (1) or not (0) an activity tool. """ return 1 - + + @newSimulationExpectedFailure def test_01_TestReportLineChangeQuantity(self, quiet=quiet, run=run_all_test): """ Change the quantity on an delivery line, then @@ -172,6 +174,7 @@ class TestTaskReportDivergence(TestTaskReportDivergenceMixin, ERP5TypeTestCase) sequence_list.play(self, quiet=quiet) + @newSimulationExpectedFailure def test_02_TestReportListChangeDestination(self, quiet=quiet, run=run_all_test): """ Test generation of delivery list @@ -195,6 +198,7 @@ class TestTaskReportDivergence(TestTaskReportDivergenceMixin, ERP5TypeTestCase) sequence_list.play(self, quiet=quiet) + @newSimulationExpectedFailure def test_03_TaskReportChangeStartDate(self, quiet=quiet, run=run_all_test): """ Test generation of delivery list diff --git a/product/ERP5/tests/testTaskReporting.py b/product/ERP5/tests/testTaskReporting.py index 5d72da3bdc310f1d8e3a4efeb4b4c9f4b3ea3b6d..939afcd9c0975b2ffbaef3e1b09eb1e3764b31cd 100644 --- a/product/ERP5/tests/testTaskReporting.py +++ b/product/ERP5/tests/testTaskReporting.py @@ -30,6 +30,7 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5ReportTestCase from Products.ERP5Type.tests.utils import reindex import transaction from DateTime import DateTime +from Products.ERP5.tests.utils import newSimulationExpectedFailure class TestTaskReporting(ERP5ReportTestCase): """Test Task Reporting @@ -163,6 +164,7 @@ class TestTaskReporting(ERP5ReportTestCase): transaction.commit() self.tic() + @newSimulationExpectedFailure def testProjectMontlyReport(self): """ Check monthly report available on project diff --git a/product/ERP5/tests/utils.py b/product/ERP5/tests/utils.py index 52e38c72c3695b4d4247dd9397989d8b215eb179..7402c430ada9135c19356d77f6cd7b62b225cffc 100644 --- a/product/ERP5/tests/utils.py +++ b/product/ERP5/tests/utils.py @@ -25,12 +25,18 @@ # ############################################################################## -import os.path +import os from Products.ERP5Type import tarfile import xml.parsers.expat import xml.dom.minidom from urllib import url2pathname +if int(os.environ.get('erp5_report_new_simulation_failures') or 0): + newSimulationExpectedFailure = lambda test: test +else: + from Products.ERP5Type.tests.backportUnittest import \ + expectedFailure as newSimulationExpectedFailure + class BusinessTemplateInfoBase: diff --git a/product/ERP5Legacy/tests/__init__.py b/product/ERP5Legacy/tests/__init__.py index c19faccb1d0ebc6f522bd35645e2cb8e0a35f03b..d51f8235838c30b6061b347bfac21d635efb0f9f 100644 --- a/product/ERP5Legacy/tests/__init__.py +++ b/product/ERP5Legacy/tests/__init__.py @@ -39,3 +39,6 @@ def Legacy_getBusinessTemplateList(cls): bt_list.append(bt + '_simulation_legacy') return tuple(bt_list) cls.getBusinessTemplateList = Legacy_getBusinessTemplateList + +from Products.ERP5.tests import utils +utils.newSimulationExpectedFailure = lambda test: test diff --git a/product/ERP5Legacy/tests/testLegacyTask.py b/product/ERP5Legacy/tests/testLegacyTask.py index f41e7b5030711910525f661cd86b76f152ce3de4..c2c1dea6a1f7751f767e68a7aff04a6a2965e50c 100644 --- a/product/ERP5Legacy/tests/testLegacyTask.py +++ b/product/ERP5Legacy/tests/testLegacyTask.py @@ -25,13 +25,14 @@ # ############################################################################## +from Products.ERP5Legacy.tests import Legacy_getBusinessTemplateList + test_suite_list = [] from Products.ERP5.tests.testTask import * test_suite_list.append(test_suite) from Products.ERP5.tests.testTaskReportDivergence import * test_suite_list.append(test_suite) -from Products.ERP5Legacy.tests import Legacy_getBusinessTemplateList TestTaskMixin.business_process = None Legacy_getBusinessTemplateList(TestTaskMixin)