Commit 44493e2e authored by Rafael Monnerat's avatar Rafael Monnerat

SlapOSMixin: Move part of this mixin into portal_components to speed up development.

  Include SlapOSTestCaseMixin on portal_components and update the tests to use
  it instead directly use SlapOSMixin from SlapOS Product
parent adea5daf
......@@ -8,8 +8,8 @@
import transaction
from functools import wraps
from Products.ERP5Type.tests.utils import createZODBPythonScript
from Products.SlapOS.tests.testSlapOSMixin import \
testSlapOSMixin, withAbort
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin, withAbort
import os
import tempfile
from DateTime import DateTime
......@@ -83,7 +83,7 @@ if context.getTitle() == 'Not visited by %s':
return wrapped
return wrapper
class TestInstanceInvoicingAlarm(testSlapOSMixin):
class TestInstanceInvoicingAlarm(SlapOSTestCaseMixin):
@withAbort
def test_noSaleOrderPackingList_newSoftwareInstance(self):
"""
......@@ -275,7 +275,7 @@ class TestInstanceInvoicingAlarm(testSlapOSMixin):
self.assertEqual(2, instance.getInvoicingSynchronizationPointer())
delivery = instance.getCausalityValue()
setup_line, update_line, destroy_line =\
setup_line, _, destroy_line =\
self.check_instance_delivery(delivery, start_date, stop_date, person, 2)
self.check_instance_movement(setup_line, instance, subscription, 1)
self.check_instance_movement(destroy_line, instance, subscription, 1)
......@@ -347,7 +347,7 @@ class TestInstanceInvoicingAlarm(testSlapOSMixin):
self.assertEqual(2, instance.getInvoicingSynchronizationPointer())
delivery = instance.getCausalityValue()
setup_line, update_line, destroy_line =\
setup_line, update_line, _ =\
self.check_instance_delivery(delivery, start_date, stop_date, person, 1)
self.check_instance_movement(setup_line, instance, subscription, 1)
......@@ -404,7 +404,7 @@ class TestInstanceInvoicingAlarm(testSlapOSMixin):
self.assertEqual(4, instance.getInvoicingSynchronizationPointer())
delivery = instance.getCausalityValue()
setup_line, update_line, destroy_line =\
setup_line, update_line, _ =\
self.check_instance_delivery(delivery, start_date, stop_date, person, 2)
self.check_instance_movement(setup_line, instance, subscription, 1)
self.check_instance_movement(update_line, instance, subscription, 2)
......@@ -525,7 +525,7 @@ class TestInstanceInvoicingAlarm(testSlapOSMixin):
self.assertEqual(4, instance.getInvoicingSynchronizationPointer())
delivery = instance.getCausalityValue()
setup_line, update_line, destroy_line =\
_, update_line, destroy_line =\
self.check_instance_delivery(delivery, start_date, stop_date, person, 1)
self.check_instance_movement(update_line, instance, subscription, 2)
......@@ -646,7 +646,7 @@ class TestInstanceInvoicingAlarm(testSlapOSMixin):
self.assertEqual(4, instance.getInvoicingSynchronizationPointer())
delivery = instance.getCausalityValue()
setup_line, update_line, destroy_line =\
setup_line, update_line, _ =\
self.check_instance_delivery(delivery, start_date, stop_date, person, 1)
self.check_instance_movement(update_line, instance, subscription, 2)
......@@ -689,7 +689,7 @@ class TestInstanceInvoicingAlarm(testSlapOSMixin):
self.check_instance_delivery(delivery, stop_date, stop_date, person, 1)
self.check_instance_movement(update_line, instance, subscription, 1)
class TestOpenSaleOrderAlarm(testSlapOSMixin):
class TestOpenSaleOrderAlarm(SlapOSTestCaseMixin):
def test_noOSO_newPerson(self):
person = self.portal.person_module.template_member\
.Base_createCloneDocument(batch_mode=1)
......@@ -743,7 +743,7 @@ class TestOpenSaleOrderAlarm(testSlapOSMixin):
'Visited by HostingSubscription_requestUpdateOpenSaleOrder',
subscription.workflow_history['edit_workflow'][-1]['comment'])
class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin):
class TestHostingSubscription_requestUpdateOpenSaleOrder(SlapOSTestCaseMixin):
def test_REQUEST_disallowed(self):
subscription = self.portal.hosting_subscription_module\
.template_hosting_subscription.Base_createCloneDocument(batch_mode=1)
......@@ -1291,7 +1291,7 @@ class TestHostingSubscription_requestUpdateOpenSaleOrder(testSlapOSMixin):
self.assertTrue(new_effective_date > effective_date,
"%s <= %s" % (new_effective_date, effective_date))
class TestSlapOSTriggerBuildAlarm(testSlapOSMixin):
class TestSlapOSTriggerBuildAlarm(SlapOSTestCaseMixin):
@simulateByTitlewMark('SimulationMovement_buildSlapOS')
def test_SimulationMovement_withoutDelivery(self):
applied_rule = self.portal.portal_simulation.newContent(
......@@ -1332,7 +1332,7 @@ class TestSlapOSTriggerBuildAlarm(testSlapOSMixin):
def test_SimulationMovement_buildSlapOS(self):
build_simulator = tempfile.mkstemp()[1]
activate_simulator = tempfile.mkstemp()[1]
business_process = self.portal.business_process_module.newContent(
portal_type='Business Process')
root_business_link = business_process.newContent(
......@@ -1415,7 +1415,7 @@ class TestSlapOSTriggerBuildAlarm(testSlapOSMixin):
def test_SimulationMovement_buildSlapOS_withDelivery(self):
build_simulator = tempfile.mkstemp()[1]
activate_simulator = tempfile.mkstemp()[1]
delivery = self.portal.sale_packing_list_module.newContent(
portal_type='Sale Packing List')
delivery_line = delivery.newContent(portal_type='Sale Packing List Line')
......@@ -1475,7 +1475,7 @@ class TestSlapOSTriggerBuildAlarm(testSlapOSMixin):
if os.path.exists(activate_simulator):
os.unlink(activate_simulator)
class TestSlapOSManageBuildingCalculatingDeliveryAlarm(testSlapOSMixin):
class TestSlapOSManageBuildingCalculatingDeliveryAlarm(SlapOSTestCaseMixin):
@simulateByTitlewMark('Delivery_manageBuildingCalculatingDelivery')
def _test(self, state, message):
delivery = self.portal.sale_packing_list_module.newContent(
......@@ -1506,7 +1506,7 @@ class TestSlapOSManageBuildingCalculatingDeliveryAlarm(testSlapOSMixin):
def _test_Delivery_manageBuildingCalculatingDelivery(self, state, empty=False):
updateCausalityState_simulator = tempfile.mkstemp()[1]
updateSimulation_simulator = tempfile.mkstemp()[1]
delivery = self.portal.sale_packing_list_module.newContent(
title='Not visited by Delivery_manageBuildingCalculatingDelivery',
portal_type='Sale Packing List')
......@@ -1656,7 +1656,7 @@ class TestSlapOSConfirmedDeliveryMixin:
'confirmed', True)
class TestSlapOSStartConfirmedAggregatedSalePackingListAlarm(
testSlapOSMixin, TestSlapOSConfirmedDeliveryMixin):
SlapOSTestCaseMixin, TestSlapOSConfirmedDeliveryMixin):
destination_state = 'started'
script = 'Delivery_startConfirmedAggregatedSalePackingList'
portal_type = 'Sale Packing List'
......@@ -1692,7 +1692,7 @@ class TestSlapOSStartConfirmedAggregatedSalePackingListAlarm(
destination_decision='organisation_module/slapos',
price_currency='currency_module/EUR',
)
movement = delivery.newContent(
delivery.newContent(
portal_type="Sale Packing List Line",
resource='service_module/slapos_instance_setup',
quantity=0,
......@@ -1708,7 +1708,7 @@ class TestSlapOSStartConfirmedAggregatedSalePackingListAlarm(
self.assertEquals(delivery.getSimulationState(), 'started')
class TestSlapOSDeliverStartedAggregatedSalePackingListAlarm(
testSlapOSMixin):
SlapOSTestCaseMixin):
destination_state = 'delivered'
script = 'Delivery_deliverStartedAggregatedSalePackingList'
portal_type = 'Sale Packing List'
......@@ -1805,13 +1805,13 @@ class TestSlapOSDeliverStartedAggregatedSalePackingListAlarm(
'started', True)
class TestSlapOSStopConfirmedAggregatedSaleInvoiceTransactionAlarm(
testSlapOSMixin, TestSlapOSConfirmedDeliveryMixin):
SlapOSTestCaseMixin, TestSlapOSConfirmedDeliveryMixin):
destination_state = 'stopped'
script = 'Delivery_stopConfirmedAggregatedSaleInvoiceTransaction'
portal_type = 'Sale Invoice Transaction'
alarm = 'slapos_stop_confirmed_aggregated_sale_invoice_transaction'
class TestSlapOSUpdateOpenSaleOrderPeriod(testSlapOSMixin):
class TestSlapOSUpdateOpenSaleOrderPeriod(SlapOSTestCaseMixin):
def createOpenOrder(self):
open_order = self.portal.open_sale_order_module\
......@@ -1947,7 +1947,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by O
'Visited by OpenSaleOrder_updatePeriod',
open_order.workflow_history['edit_workflow'][-1]['comment'])
class TestSlapOSReindexOpenSaleOrder(testSlapOSMixin):
class TestSlapOSReindexOpenSaleOrder(SlapOSTestCaseMixin):
def createOpenOrder(self):
open_order = self.portal.open_sale_order_module\
......@@ -2004,7 +2004,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by O
'Visited by OpenSaleOrder_reindexIfIndexedBeforeLine',
open_order.workflow_history['edit_workflow'][-1]['comment'])
class TestSlapOSGeneratePackingListFromTioXML(testSlapOSMixin):
class TestSlapOSGeneratePackingListFromTioXML(SlapOSTestCaseMixin):
def createTioXMLFile(self):
document = self.portal.consumption_document_module.newContent(
......
......@@ -47,14 +47,9 @@
<value>
<tuple>
<string>W: 30, 10: Use of eval (eval-used)</string>
<string>W:278, 16: Unused variable \'update_line\' (unused-variable)</string>
<string>W:350, 16: Unused variable \'update_line\' (unused-variable)</string>
<string>W:350, 29: Unused variable \'destroy_line\' (unused-variable)</string>
<string>W:407, 29: Unused variable \'destroy_line\' (unused-variable)</string>
<string>W:528, 29: Unused variable \'destroy_line\' (unused-variable)</string>
<string>W:528, 4: Unused variable \'setup_line\' (unused-variable)</string>
<string>W:528, 20: Unused variable \'destroy_line\' (unused-variable)</string>
<string>W:588, 4: Unused variable \'setup_line\' (unused-variable)</string>
<string>W:649, 29: Unused variable \'destroy_line\' (unused-variable)</string>
<string>W:649, 4: Unused variable \'setup_line\' (unused-variable)</string>
<string>W:688, 29: Unused variable \'destroy_line\' (unused-variable)</string>
<string>W:688, 4: Unused variable \'setup_line\' (unused-variable)</string>
......@@ -68,7 +63,6 @@
<string>W:1463, 23: Use of eval (eval-used)</string>
<string>W:1526, 35: Use of eval (eval-used)</string>
<string>W:1527, 31: Use of eval (eval-used)</string>
<string>W:1695, 4: Unused variable \'movement\' (unused-variable)</string>
</tuple>
</value>
</item>
......
......@@ -5,15 +5,13 @@
#
##############################################################################
from Products.SlapOS.tests.testSlapOSMixin import \
testSlapOSMixin
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin
from DateTime import DateTime
import transaction
def convertCategoryList(base, l):
return ['%s/%s' % (base, q) for q in l]
class TestSlapOSSalePackingListBuilder(testSlapOSMixin):
class TestSlapOSSalePackingListBuilder(SlapOSTestCaseMixin):
def checkSimulationMovement(self, simulation_movement):
self.assertEqual(1.0, simulation_movement.getDeliveryRatio())
self.assertEqual(0.0, simulation_movement.getDeliveryError())
......@@ -1210,7 +1208,7 @@ class TestSlapOSSaleInvoiceTransactionTradeModelBuilder(TestSlapOSSalePackingLis
self.assertEqual(invoice_2.getRelativeUrl(),
model_line_2_tax_bis.getParentValue().getRelativeUrl())
class TestSlapOSAggregatedDeliveryBuilder(testSlapOSMixin):
class TestSlapOSAggregatedDeliveryBuilder(SlapOSTestCaseMixin):
def emptyBuild(self, **kw):
delivery_list = self._build(**kw)
self.assertSameSet([], delivery_list)
......
......@@ -6,10 +6,22 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSAccountingBuilder</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSAccountingBuilder</string> </value>
......@@ -33,9 +45,7 @@
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 11, 0: Unused import transaction (unused-import)</string>
</tuple>
<tuple/>
</value>
</item>
<item>
......@@ -45,13 +55,28 @@
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -64,7 +89,7 @@
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -73,7 +98,7 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
......
......@@ -6,7 +6,7 @@
##############################################################################
from erp5.component.test.testSlapOSCloudConstraint import TestSlapOSConstraintMixin
from Products.ERP5Type.Base import WorkflowMethod
from Products.SlapOS.tests.testSlapOSMixin import withAbort
from erp5.component.test.SlapOSTestCaseMixin import withAbort
from unittest import skip
import transaction
......
# Copyright (c) 2012 Nexedi SA and Contributors. All Rights Reserved.
from Products.SlapOS.tests.testSlapOSMixin import \
testSlapOSMixin
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin
import transaction
from Products.ERP5Type.tests.utils import createZODBPythonScript
from DateTime import DateTime
from Products.ERP5Type.DateUtils import addToDate
class TestSlapOSAccountingInteractionWorkflow(testSlapOSMixin):
class TestSlapOSAccountingInteractionWorkflow(SlapOSTestCaseMixin):
def beforeTearDown(self):
transaction.abort()
......
......@@ -6,10 +6,22 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSAccountingInteractionWorkflow</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSAccountingInteractionWorkflow</string> </value>
......@@ -33,9 +45,7 @@
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 7, 0: Unused import addToDate (unused-import)</string>
</tuple>
<tuple/>
</value>
</item>
<item>
......@@ -45,13 +55,28 @@
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -64,7 +89,7 @@
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -73,7 +98,7 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
......
......@@ -4,9 +4,8 @@
# Copyright (c) 2012 Nexedi SA and Contributors. All Rights Reserved.
#
##############################################################################
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin, withAbort
from Products.SlapOS.tests.testSlapOSMixin import \
testSlapOSMixin, withAbort
from DateTime import DateTime
from Products.ERP5Type.DateUtils import addToDate
from Products.ERP5.Document.SimulationMovement import SimulationMovement
......@@ -17,9 +16,9 @@ def getSimulationStatePlanned(self, *args, **kwargs):
def getSimulationStateDelivered(self, *args, **kwargs):
if self.getId() == 'root_simulation_movement' or \
self.getParentValue().getParentValue().getId() == \
self.getParentValue().getParentValue().getId() == \
'root_simulation_movement':
return 'delivered'
return 'delivered'
return 'planned'
def getSimulationStatePlannedDelivered(self, *args, **kwargs):
......@@ -27,7 +26,7 @@ def getSimulationStatePlannedDelivered(self, *args, **kwargs):
return 'delivered'
return 'planned'
class TestDefaultInvoiceTransactionRule(testSlapOSMixin):
class TestDefaultInvoiceTransactionRule(SlapOSTestCaseMixin):
@withAbort
def test_simulation(self):
SimulationMovement.original_getSimulationState = SimulationMovement\
......@@ -159,7 +158,7 @@ class TestDefaultInvoiceTransactionRule(testSlapOSMixin):
.original_getSimulationState
class TestDefaultInvoiceRule(testSlapOSMixin):
class TestDefaultInvoiceRule(SlapOSTestCaseMixin):
@withAbort
def test_simulation(self):
SimulationMovement.original_getSimulationState = SimulationMovement\
......@@ -233,7 +232,7 @@ class TestDefaultInvoiceRule(testSlapOSMixin):
.original_getSimulationState
class TestDefaultInvoicingRule(testSlapOSMixin):
class TestDefaultInvoicingRule(SlapOSTestCaseMixin):
@withAbort
def test_simulation(self):
SimulationMovement.original_getSimulationState = SimulationMovement\
......@@ -353,7 +352,7 @@ class TestDefaultInvoicingRule(testSlapOSMixin):
SimulationMovement.getSimulationState = SimulationMovement\
.original_getSimulationState
class TestDefaultPaymentRule(testSlapOSMixin):
class TestDefaultPaymentRule(SlapOSTestCaseMixin):
@withAbort
def test_simulation(self):
SimulationMovement.original_getSimulationState = SimulationMovement\
......@@ -418,7 +417,7 @@ class TestDefaultPaymentRule(testSlapOSMixin):
SimulationMovement.getSimulationState = SimulationMovement\
.original_getSimulationState
class TestHostingSubscriptionSimulation(testSlapOSMixin):
class TestHostingSubscriptionSimulation(SlapOSTestCaseMixin):
def _prepare(self):
person = self.portal.person_module.template_member\
.Base_createCloneDocument(batch_mode=1)
......@@ -666,7 +665,7 @@ class TestHostingSubscriptionSimulation(testSlapOSMixin):
SimulationMovement.isFrozen = SimulationMovement.originalIsFrozen
delattr(SimulationMovement, 'originalIsFrozen')
class TestDefaultTradeModelRule(testSlapOSMixin):
class TestDefaultTradeModelRule(SlapOSTestCaseMixin):
@withAbort
def test_simulation(self):
SimulationMovement.original_getSimulationState = SimulationMovement\
......@@ -779,7 +778,7 @@ class TestDefaultTradeModelRule(testSlapOSMixin):
SimulationMovement.getSimulationState = SimulationMovement\
.original_getSimulationState
class TestDefaultDeliveryRule(testSlapOSMixin):
class TestDefaultDeliveryRule(SlapOSTestCaseMixin):
trade_condition = 'sale_trade_condition_module/slapos_aggregated_trade_condition'
def test(self):
def newArrow():
......@@ -867,7 +866,7 @@ class TestDefaultDeliveryRule(testSlapOSMixin):
self.assertSameSet(['default_invoicing_rule'], [q.getSpecialiseReference()
for q in simulation_movement.contentValues(portal_type='Applied Rule')])
class TestDefaultDeliveryRuleConsumption(testSlapOSMixin):
class TestDefaultDeliveryRuleConsumption(SlapOSTestCaseMixin):
def test(self):
def newArrow():
return self.portal.organisation_module.newContent(
......@@ -907,6 +906,6 @@ class TestDefaultDeliveryRuleConsumption(testSlapOSMixin):
applied_rule_list = delivery.getCausalityRelatedValueList()
self.assertEqual(0, len(applied_rule_list))
class TestDefaultDeliveryRuleSubscription(testSlapOSMixin):
class TestDefaultDeliveryRuleSubscription(SlapOSTestCaseMixin):
trade_condition = 'sale_trade_condition_module/slapos_subscr'\
'iption_trade_condition'
......@@ -6,10 +6,22 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSAccountingRule</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSAccountingRule</string> </value>
......@@ -33,9 +45,7 @@
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 22, 0: Bad indentation. Found 6 spaces, expected 4 (bad-indentation)</string>
</tuple>
<tuple/>
</value>
</item>
<item>
......@@ -45,13 +55,28 @@
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -64,7 +89,7 @@
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -73,7 +98,7 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle>
......
......@@ -4,14 +4,13 @@
# Copyright (c) 2012 Nexedi SA and Contributors. All Rights Reserved.
#
##############################################################################
from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin, withAbort
from Products.SlapOS.tests.testSlapOSMixin import \
testSlapOSMixin, withAbort
from zExceptions import Unauthorized
from DateTime import DateTime
import time
class TestSlapOSAccounting(testSlapOSMixin):
class TestSlapOSAccounting(SlapOSTestCaseMixin):
def createHostingSubscription(self):
new_id = self.generateNewId()
......
......@@ -6,10 +6,22 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testSlapOSAccountingSkins</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSAccountingSkins</string> </value>
......@@ -34,7 +46,7 @@
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W:174, 4: Unused variable \'line\' (unused-variable)</string>
<string>W:173, 4: Unused variable \'line\' (unused-variable)</string>
</tuple>
</value>
</item>
......@@ -45,13 +57,28 @@
<item>
<key> <string>workflow_history</string> </key>
<value>