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

Follow changes in test.

Because of builders begin invoked on each tic packing list is created
immediately.

Follow isBuildable API change -- find and pass Business Link.
parent d59341d4
...@@ -143,10 +143,15 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin): ...@@ -143,10 +143,15 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
self.assertEqual(expected_start_date, simulation_movement.getStartDate()) self.assertEqual(expected_start_date, simulation_movement.getStartDate())
self.assertEqual(expected_stop_date, simulation_movement.getStopDate()) self.assertEqual(expected_stop_date, simulation_movement.getStopDate())
# not delivered yet # delivered already
self.assertEqual(None, simulation_movement.getDelivery()) self.assertNotEqual(None, simulation_movement.getDeliveryValue())
# packing list shall be buildable business_process = simulation_movement.getCausalityValue(
self.assertTrue(simulation_movement.isBuildable()) portal_type='Trade Model Path').getParentValue()
self.assertEqual('Sale Packing List Line', simulation_movement\
.getDeliveryValue().getPortalType())
self.assertFalse(simulation_movement.isBuildable(
business_link=business_process.getBusinessLinkValueList(
context=simulation_movement)[0]))
# fetch invoice level simulation # fetch invoice level simulation
applied_rule_invoice_list = \ applied_rule_invoice_list = \
...@@ -165,7 +170,9 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin): ...@@ -165,7 +170,9 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
# not delivered yet # not delivered yet
self.assertEqual(None, simulation_movement_invoice.getDelivery()) self.assertEqual(None, simulation_movement_invoice.getDelivery())
# invoice shall be not yet buildable # invoice shall be not yet buildable
self.assertFalse(False, simulation_movement_invoice.isBuildable()) self.assertFalse(False, simulation_movement_invoice.isBuildable(
business_link=business_process.getBusinessLinkValueList(
context=simulation_movement_invoice)[0]))
# check property of invoice simulation # check property of invoice simulation
self.assertEquals(1.0, self.assertEquals(1.0,
...@@ -226,7 +233,9 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin): ...@@ -226,7 +233,9 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
# not delivered nor buildable # not delivered nor buildable
self.assertEqual(None, simulation_movement_invoice_transaction\ self.assertEqual(None, simulation_movement_invoice_transaction\
.getDelivery()) .getDelivery())
self.assertFalse(simulation_movement_invoice_transaction.isBuildable()) self.assertFalse(simulation_movement_invoice_transaction.isBuildable(
business_link=business_process.getBusinessLinkValueList(
context=simulation_movement_invoice_transaction)[0]))
if "business_process_module/vifib_sale_business_process/account_credit_path" \ if "business_process_module/vifib_sale_business_process/account_credit_path" \
in simulation_movement_invoice_transaction.getCausalityList(): in simulation_movement_invoice_transaction.getCausalityList():
simulation_movement_invoice_transaction_credit = \ simulation_movement_invoice_transaction_credit = \
...@@ -240,13 +249,15 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin): ...@@ -240,13 +249,15 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
self.assertEqual(None, simulation_movement_invoice_transaction_credit\ self.assertEqual(None, simulation_movement_invoice_transaction_credit\
.getDelivery()) .getDelivery())
self.assertFalse(simulation_movement_invoice_transaction_credit\ self.assertFalse(simulation_movement_invoice_transaction_credit\
.isBuildable()) .isBuildable(business_link=business_process.getBusinessLinkValueList(
context=simulation_movement_invoice_transaction_credit)[0]))
self.assertNotEquals(None, simulation_movement_invoice_transaction_debit) self.assertNotEquals(None, simulation_movement_invoice_transaction_debit)
# not delivered nor buildable # not delivered nor buildable
self.assertEqual(None, simulation_movement_invoice_transaction_debit\ self.assertEqual(None, simulation_movement_invoice_transaction_debit\
.getDelivery()) .getDelivery())
self.assertFalse(simulation_movement_invoice_transaction_debit\ self.assertFalse(simulation_movement_invoice_transaction_debit\
.isBuildable()) .isBuildable(business_link=business_process.getBusinessLinkValueList(
context=simulation_movement_invoice_transaction_debit)[0]))
# check property of invoice transaction simulation # check property of invoice transaction simulation
self.assertEquals(-1.0, self.assertEquals(-1.0,
...@@ -337,13 +348,15 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin): ...@@ -337,13 +348,15 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
self.assertEqual(None, simulation_movement_credit_payment_credit\ self.assertEqual(None, simulation_movement_credit_payment_credit\
.getDelivery()) .getDelivery())
self.assertFalse(simulation_movement_credit_payment_credit\ self.assertFalse(simulation_movement_credit_payment_credit\
.isBuildable()) .isBuildable(business_link=business_process.getBusinessLinkValueList(
context=simulation_movement_credit_payment_credit)[0]))
self.assertNotEquals(None, simulation_movement_credit_payment_debit) self.assertNotEquals(None, simulation_movement_credit_payment_debit)
# not delivered nor buildable # not delivered nor buildable
self.assertEqual(None, simulation_movement_credit_payment_debit\ self.assertEqual(None, simulation_movement_credit_payment_debit\
.getDelivery()) .getDelivery())
self.assertFalse(simulation_movement_credit_payment_debit\ self.assertFalse(simulation_movement_credit_payment_debit\
.isBuildable()) .isBuildable(business_link=business_process.getBusinessLinkValueList(
context=simulation_movement_credit_payment_debit)[0]))
# check payment level of simulation # check payment level of simulation
self.assertEquals(-1.0, self.assertEquals(-1.0,
......
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