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

configurator_standard: enable CheckQuantityConversion in test

this is supposed to work
parent e5587493
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
import os import os
from unittest import expectedFailure
from DateTime import DateTime from DateTime import DateTime
from Products.ERP5Type.tests.Sequence import SequenceList from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5Type.tests.runUnitTest import tests_home from Products.ERP5Type.tests.runUnitTest import tests_home
...@@ -870,20 +869,28 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin): ...@@ -870,20 +869,28 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
self.assertEqual(currency.getRelativeUrl(), self.assertEqual(currency.getRelativeUrl(),
purchase_trade_condition.getPriceCurrency()) purchase_trade_condition.getPriceCurrency())
@expectedFailure
def stepCheckQuantityConversion(self, sequence=None, sequence_list=None, **kw): def stepCheckQuantityConversion(self, sequence=None, sequence_list=None, **kw):
"""Check that standard unit can be converted between each other,
ie 1000 grams == 1 kilogram
"""
resource = self.portal.product_module.newContent( resource = self.portal.product_module.newContent(
portal_type='Product', portal_type='Product',
quantity_unit_list=('mass/gram', quantity_unit_list=('mass/gram',
'mass/kilogram'),) 'mass/kilogram'),)
node = self.portal.organisation_module.newContent( node = self.portal.organisation_module.newContent(
portal_type='Organisation') portal_type='Organisation')
purchase_trade_condition_value_list = self.getBusinessConfigurationObjectList(
sequence['business_configuration'],
'Purchase Trade Condition')
self.assertNotEqual(len(purchase_trade_condition_value_list), 0)
purchase_trade_condition_value = purchase_trade_condition_value_list[0]
delivery = self.portal.purchase_packing_list_module.newContent( delivery = self.portal.purchase_packing_list_module.newContent(
portal_type='Purchase Packing List', portal_type='Purchase Packing List',
start_date='2010-01-26', start_date='2010-01-26',
price_currency='currency_module/EUR', price_currency='currency_module/EUR',
destination_value=node, destination_value=node,
destination_section_value=node) destination_section_value=node,
specialise_value=purchase_trade_condition_value)
delivery.newContent(portal_type='Purchase Packing List Line', delivery.newContent(portal_type='Purchase Packing List Line',
resource_value=resource, resource_value=resource,
quantity=10, quantity=10,
...@@ -1380,6 +1387,8 @@ class TestStandardConfiguratorWorkflow(StandardConfigurationMixin): ...@@ -1380,6 +1387,8 @@ class TestStandardConfiguratorWorkflow(StandardConfigurationMixin):
stepStartConfigurationInstallation stepStartConfigurationInstallation
stepTic stepTic
stepCheckInstanceIsConfigured%(country)s stepCheckInstanceIsConfigured%(country)s
stepTic
stepCheckQuantityConversion
""" + \ """ + \
StandardConfigurationMixin.AFTER_CONFIGURATION_SEQUENCE + \ StandardConfigurationMixin.AFTER_CONFIGURATION_SEQUENCE + \
StandardConfigurationMixin.SECURITY_CONFIGURATION_SEQUENCE StandardConfigurationMixin.SECURITY_CONFIGURATION_SEQUENCE
......
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