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

Follow code change.

Invoices has no causality.
parent e8ff4162
...@@ -143,11 +143,8 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin): ...@@ -143,11 +143,8 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
invoice = setup_invoice_line_list[0].getParentValue() invoice = setup_invoice_line_list[0].getParentValue()
self.assertEqual('solved', invoice.getCausalityState()) self.assertEqual('solved', invoice.getCausalityState())
# invoice shall have causality of one packing list # invoice shall have no causality
self.assertSameSet( self.assertEqual(invoice.getCausalityList(), [])
[setup_delivery_line_list[0].getParentValue().getUid(),
subscription_delivery_line_list[0].getParentValue().getUid()],
invoice.getCausalityUidList())
# there shall be no payment transaction related # there shall be no payment transaction related
self.assertEqual([], invoice.getCausalityRelatedList( self.assertEqual([], invoice.getCausalityRelatedList(
...@@ -229,11 +226,9 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin): ...@@ -229,11 +226,9 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
# invoice shall be solved # invoice shall be solved
self.assertEqual('solved', setup_invoice_line_list[0].getCausalityState()) self.assertEqual('solved', setup_invoice_line_list[0].getCausalityState())
# invoice shall have causality of two packing lists # invoice shall have no causality
self.assertEqual( self.assertEqual(setup_invoice_line_list[0].getParentValue()\
sorted([setup_delivery_line_list[0].getParentValue().getUid()] + .getCausalityList(), [])
[q.getParentValue().getUid() for q in subscription_delivery_line_list if q.getSimulationState() == 'delivered']),
sorted(setup_invoice_line_list[0].getParentValue().getCausalityUidList()))
def stepSelectPlannedInvoice(self, sequence, **kw): def stepSelectPlannedInvoice(self, sequence, **kw):
hosting_subscription = self.portal.portal_catalog.getResultValue( hosting_subscription = self.portal.portal_catalog.getResultValue(
...@@ -339,20 +334,11 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin): ...@@ -339,20 +334,11 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
self.assertEqual([], confirmed_invoice.getCausalityRelatedList( self.assertEqual([], confirmed_invoice.getCausalityRelatedList(
portal_type='Payment Transaction')) portal_type='Payment Transaction'))
# confirmed invoice shall have causality of two packing lists # confirmed invoice shall have no causality
self.assertEqual( self.assertEqual(confirmed_invoice.getCausalityList(), [])
sorted([setup_delivery_line_list[0].getParentValue().getUid()] +
[q.getParentValue().getUid() for q in subscription_delivery_line_list \
if q.getSimulationState() == 'stopped' and \
q.getParentValue().getUid() != sequence['subscription_delivery_uid']]),
sorted(confirmed_invoice.getCausalityUidList()))
# planned invoice shall have causality of one packing list # planned invoice shall have no causality
self.assertEqual( self.assertEqual(planned_invoice.getCausalityList(), [])
[q.getParentValue().getUid() for q in subscription_delivery_line_list \
if q.getSimulationState() == 'stopped' and \
q.getParentValue().getUid() == sequence['subscription_delivery_uid']],
planned_invoice.getCausalityUidList())
def stepStartInvoice(self, sequence, **kw): def stepStartInvoice(self, sequence, **kw):
self.portal.portal_catalog.getResultValue( self.portal.portal_catalog.getResultValue(
...@@ -463,20 +449,11 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin): ...@@ -463,20 +449,11 @@ class TestVifibInstanceHostingRelatedDocument(TestVifibSlapWebServiceMixin):
self.assertEqual(stopped_invoice.getTotalPrice(), self.assertEqual(stopped_invoice.getTotalPrice(),
-1 * payment_transaction.PaymentTransaction_getTotalPayablePrice()) -1 * payment_transaction.PaymentTransaction_getTotalPayablePrice())
# Stopped invoice shall have causality of two packing lists # Stopped invoice shall have no causality
self.assertEqual( self.assertEqual(stopped_invoice.getCausalityList(), [])
sorted([setup_delivery_line_list[0].getParentValue().getUid()] +
[q.getParentValue().getUid() for q in subscription_delivery_line_list \
if q.getSimulationState() == 'stopped' and \
q.getParentValue().getUid() != sequence['subscription_delivery_uid']]),
sorted(stopped_invoice.getCausalityUidList()))
# planned invoice shall have causality of one packing list # planned invoice shall have no causality
self.assertEqual( self.assertEqual(planned_invoice.getCausalityList(), [])
[q.getParentValue().getUid() for q in subscription_delivery_line_list \
if q.getSimulationState() == 'stopped' and \
q.getParentValue().getUid() == sequence['subscription_delivery_uid']],
planned_invoice.getCausalityUidList())
def stepCheckHostingSubscriptionTwoStoppedInvoiceDocumentCoverage(self, def stepCheckHostingSubscriptionTwoStoppedInvoiceDocumentCoverage(self,
sequence, **kw): sequence, **kw):
......
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