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

- add tests for invoice's subcontent reindexing


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37759 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f639178c
...@@ -2443,7 +2443,21 @@ self.portal.getDefaultModule(self.packing_list_portal_type).newContent( ...@@ -2443,7 +2443,21 @@ self.portal.getDefaultModule(self.packing_list_portal_type).newContent(
self.assertEquals([], packing_list.getDivergenceList()) self.assertEquals([], packing_list.getDivergenceList())
self.assertEquals('solved', packing_list.getCausalityState()) self.assertEquals('solved', packing_list.getCausalityState())
def test_subcontent_reindexing(self):
"""Tests, that modification on Order are propagated to lines and cells
during reindxation"""
invoice = self.portal.getDefaultModule(self.invoice_portal_type
).newContent(portal_type=self.invoice_portal_type,
created_by_builder=1)
self.stepTic()
invoice_line = invoice.newContent(
portal_type=self.invoice_line_portal_type)
invoice_cell = invoice_line.newContent(
portal_type=self.invoice_cell_portal_type)
transaction_line = invoice.newContent(
portal_type=self.invoice_transaction_line_portal_type)
self._testSubContentReindexing(invoice, [invoice_line, transaction_line,
invoice_cell])
class TestSaleInvoiceMixin(TestInvoiceMixin, class TestSaleInvoiceMixin(TestInvoiceMixin,
ERP5TypeTestCase): ERP5TypeTestCase):
...@@ -3478,7 +3492,6 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase): ...@@ -3478,7 +3492,6 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase):
self.assertEquals('solved', packing_list.getCausalityState()) self.assertEquals('solved', packing_list.getCausalityState())
self.assertEquals('solved', invoice.getCausalityState()) self.assertEquals('solved', invoice.getCausalityState())
class TestPurchaseInvoice(TestInvoice, ERP5TypeTestCase): class TestPurchaseInvoice(TestInvoice, ERP5TypeTestCase):
"""Tests for purchase invoice. """Tests for purchase invoice.
""" """
......
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