Commit ebe67cb2 authored by Łukasz Nowak's avatar Łukasz Nowak

Fixup 6db47987

Note: for now leave dirty strings, as refactoring is failing in case of too much
manipulation.
parent 7df9504b
...@@ -69,10 +69,9 @@ class TestDefaultInvoiceTransactionRule(testSlapOSMixin): ...@@ -69,10 +69,9 @@ class TestDefaultInvoiceTransactionRule(testSlapOSMixin):
use='trade/sale', use='trade/sale',
trade_phase='slapos/invoicing', trade_phase='slapos/invoicing',
quantity_unit='unit/piece', quantity_unit='unit/piece',
specialise='sale_trade_condition_module/slapos_aggregated_trade_condition', specialise=
causality_list=['business_process_module/slapos_sale_business_p' 'sale_trade_condition_module/slapos_aggregated_trade_condition',
'rocess/invoice_path', 'business_process_module/slapos_sale_b' causality_list=['business_process_module/slapos_aggregated_business_process/invoice_path', 'business_process_module/slapos_aggregated_business_process/invoice'],
'usiness_process/invoice'],
delivery_value=self.portal.accounting_module.newContent( delivery_value=self.portal.accounting_module.newContent(
portal_type='Sale Invoice Transaction').newContent( portal_type='Sale Invoice Transaction').newContent(
portal_type='Invoice Line') portal_type='Invoice Line')
...@@ -105,11 +104,9 @@ class TestDefaultInvoiceTransactionRule(testSlapOSMixin): ...@@ -105,11 +104,9 @@ class TestDefaultInvoiceTransactionRule(testSlapOSMixin):
portal_type='Simulation Movement') portal_type='Simulation Movement')
self.assertEqual(2, len(simulation_movement_list)) self.assertEqual(2, len(simulation_movement_list))
debit_movement_list = [q for q in simulation_movement_list if \ debit_movement_list = [q for q in simulation_movement_list if \
q.getCausality() == 'business_process_module/slapos_sale_busines' q.getCausality() == 'business_process_module/slapos_aggregated_business_process/account_debit_path']
's_process/account_debit_path']
credit_movement_list = [q for q in simulation_movement_list if \ credit_movement_list = [q for q in simulation_movement_list if \
q.getCausality() == 'business_process_module/slapos_sale_busines' q.getCausality() == 'business_process_module/slapos_aggregated_business_process/account_credit_path']
's_process/account_credit_path']
self.assertEqual(1, len(debit_movement_list)) self.assertEqual(1, len(debit_movement_list))
self.assertEqual(1, len(credit_movement_list)) self.assertEqual(1, len(credit_movement_list))
debit_movement = debit_movement_list[0] debit_movement = debit_movement_list[0]
...@@ -204,9 +201,7 @@ class TestDefaultInvoicingRule(testSlapOSMixin): ...@@ -204,9 +201,7 @@ class TestDefaultInvoicingRule(testSlapOSMixin):
trade_phase='slapos/delivery', trade_phase='slapos/delivery',
quantity_unit='unit/piece', quantity_unit='unit/piece',
specialise='sale_trade_condition_module/slapos_aggregated_trade_condition', specialise='sale_trade_condition_module/slapos_aggregated_trade_condition',
causality_list=['business_process_module/slapos_sale_business_p' causality_list=['business_process_module/slapos_aggregated_business_process/delivery_path', 'business_process_module/slapos_aggregated_business_process/deliver'])
'rocess/delivery_path', 'business_process_module/slapos_sale_'
'business_process/deliver'])
self.assertEqual('planned', self.assertEqual('planned',
root_simulation_movement.getSimulationState()) root_simulation_movement.getSimulationState())
...@@ -266,9 +261,7 @@ class TestDefaultInvoicingRule(testSlapOSMixin): ...@@ -266,9 +261,7 @@ class TestDefaultInvoicingRule(testSlapOSMixin):
simulation_movement.getQuantityUnit()) simulation_movement.getQuantityUnit())
self.assertEqual(root_simulation_movement.getSpecialise(), self.assertEqual(root_simulation_movement.getSpecialise(),
simulation_movement.getSpecialise()) simulation_movement.getSpecialise())
self.assertEqual(['business_process_module/slapos_sale_business_p' self.assertEqual(['business_process_module/slapos_aggregated_business_process/invoice_path', 'business_process_module/slapos_aggregated_business_process/invoice'], simulation_movement.getCausalityList())
'rocess/invoice_path', 'business_process_module/slapos_sale_b'
'usiness_process/invoice'], simulation_movement.getCausalityList())
# check children rules' type # check children rules' type
child_applied_rule_type_list = [q.getSpecialiseReference() for q in \ child_applied_rule_type_list = [q.getSpecialiseReference() for q in \
simulation_movement.contentValues(portal_type='Applied Rule')] simulation_movement.contentValues(portal_type='Applied Rule')]
...@@ -322,8 +315,7 @@ class TestDefaultPaymentRule(testSlapOSMixin): ...@@ -322,8 +315,7 @@ class TestDefaultPaymentRule(testSlapOSMixin):
trade_phase='slapos/accounting', trade_phase='slapos/accounting',
quantity_unit='unit/piece', quantity_unit='unit/piece',
specialise='sale_trade_condition_module/slapos_aggregated_trade_condition', specialise='sale_trade_condition_module/slapos_aggregated_trade_condition',
causality_list=['business_process_module/slapos_sale_busines' causality_list=['business_process_module/slapos_aggregated_business_process/account'],
's_process/account'],
delivery_value=self.portal.accounting_module.newContent( delivery_value=self.portal.accounting_module.newContent(
portal_type='Sale Invoice Transaction').newContent( portal_type='Sale Invoice Transaction').newContent(
portal_type='Invoice Line') portal_type='Invoice Line')
...@@ -355,11 +347,9 @@ class TestDefaultPaymentRule(testSlapOSMixin): ...@@ -355,11 +347,9 @@ class TestDefaultPaymentRule(testSlapOSMixin):
portal_type='Simulation Movement') portal_type='Simulation Movement')
self.assertEqual(2, len(simulation_movement_list)) self.assertEqual(2, len(simulation_movement_list))
debit_movement_list = [q for q in simulation_movement_list if \ debit_movement_list = [q for q in simulation_movement_list if \
q.getCausality() == 'business_process_module/slapos_sale_busines' q.getCausality() == 'business_process_module/slapos_aggregated_business_process/payment_debit_path']
's_process/payment_debit_path']
credit_movement_list = [q for q in simulation_movement_list if \ credit_movement_list = [q for q in simulation_movement_list if \
q.getCausality() == 'business_process_module/slapos_sale_busines' q.getCausality() == 'business_process_module/slapos_aggregated_business_process/payment_credit_path']
's_process/payment_credit_path']
self.assertEqual(1, len(debit_movement_list)) self.assertEqual(1, len(debit_movement_list))
self.assertEqual(1, len(credit_movement_list)) self.assertEqual(1, len(credit_movement_list))
debit_movement = debit_movement_list[0] debit_movement = debit_movement_list[0]
...@@ -694,9 +684,7 @@ class TestDefaultTradeModelRule(testSlapOSMixin): ...@@ -694,9 +684,7 @@ class TestDefaultTradeModelRule(testSlapOSMixin):
trade_phase='slapos/invoicing', trade_phase='slapos/invoicing',
quantity_unit='unit/piece', quantity_unit='unit/piece',
specialise='sale_trade_condition_module/slapos_aggregated_trade_condition', specialise='sale_trade_condition_module/slapos_aggregated_trade_condition',
causality_list=['business_process_module/slapos_sale_business_p' causality_list=['business_process_module/slapos_aggregated_business_process/invoice_path', 'business_process_module/slapos_aggregated_business_process/invoice'],
'rocess/invoice_path', 'business_process_module/slapos_sale_b'
'usiness_process/invoice'],
delivery_value=self.portal.accounting_module.newContent( delivery_value=self.portal.accounting_module.newContent(
portal_type='Sale Invoice Transaction').newContent( portal_type='Sale Invoice Transaction').newContent(
portal_type='Invoice Line') portal_type='Invoice Line')
......
150 151
\ No newline at end of file \ No newline at end of file
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