Commit 1c429d07 authored by Łukasz Nowak's avatar Łukasz Nowak

No need to force passing Business Path to isBuildable

parent 602cadc1
...@@ -145,13 +145,9 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin): ...@@ -145,13 +145,9 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin):
# delivered already # delivered already
self.assertNotEqual(None, simulation_movement.getDeliveryValue()) self.assertNotEqual(None, simulation_movement.getDeliveryValue())
business_process = simulation_movement.getCausalityValue(
portal_type='Trade Model Path').getParentValue()
self.assertEqual('Sale Packing List Line', simulation_movement\ self.assertEqual('Sale Packing List Line', simulation_movement\
.getDeliveryValue().getPortalType()) .getDeliveryValue().getPortalType())
self.assertFalse(simulation_movement.isBuildable( 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 = \
...@@ -170,9 +166,7 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin): ...@@ -170,9 +166,7 @@ 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,
...@@ -233,9 +227,7 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin): ...@@ -233,9 +227,7 @@ 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 = \
...@@ -249,15 +241,13 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin): ...@@ -249,15 +241,13 @@ 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(business_link=business_process.getBusinessLinkValueList( .isBuildable())
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(business_link=business_process.getBusinessLinkValueList( .isBuildable())
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,
...@@ -348,15 +338,13 @@ class TestVifibOpenOrderSimulation(TestVifibSlapWebServiceMixin): ...@@ -348,15 +338,13 @@ 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(business_link=business_process.getBusinessLinkValueList( .isBuildable())
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(business_link=business_process.getBusinessLinkValueList( .isBuildable())
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