Commit c043ca20 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

move _acceptDivergenceOnInvoice and _adoptDivergenceOnInvoice to TestInvoice...

move _acceptDivergenceOnInvoice and _adoptDivergenceOnInvoice to TestInvoice class because they are also used in TestPurchaseInvoice

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31894 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5226cb26
...@@ -1448,6 +1448,13 @@ self.portal.getDefaultModule(self.packing_list_portal_type).newContent( ...@@ -1448,6 +1448,13 @@ self.portal.getDefaultModule(self.packing_list_portal_type).newContent(
def _acceptDivergenceOnInvoice(self, invoice, divergence_list):
builder_list = invoice.getBuilderList()
self.assertEquals(2, len(builder_list))
for builder in builder_list:
builder.solveDivergence(invoice.getRelativeUrl(),
divergence_to_accept_list=divergence_list)
def test_accept_quantity_divergence_on_invoice_with_stopped_packing_list( def test_accept_quantity_divergence_on_invoice_with_stopped_packing_list(
self, quiet=quiet): self, quiet=quiet):
sequence_list = SequenceList() sequence_list = SequenceList()
...@@ -1501,6 +1508,13 @@ self.portal.getDefaultModule(self.packing_list_portal_type).newContent( ...@@ -1501,6 +1508,13 @@ 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 _adoptDivergenceOnInvoice(self, invoice, divergence_list):
builder_list = invoice.getBuilderList()
self.assertEquals(2, len(builder_list))
for builder in builder_list:
builder.solveDivergence(invoice.getRelativeUrl(),
divergence_to_adopt_list=divergence_list)
def test_adopt_quantity_divergence_on_invoice_line_with_stopped_packing_list( def test_adopt_quantity_divergence_on_invoice_line_with_stopped_packing_list(
self, quiet=quiet): self, quiet=quiet):
# #1053 # #1053
...@@ -3346,26 +3360,12 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase): ...@@ -3346,26 +3360,12 @@ class TestSaleInvoice(TestSaleInvoiceMixin, TestInvoice, ERP5TypeTestCase):
""") """)
sequence_list.play(self, quiet=quiet) sequence_list.play(self, quiet=quiet)
def _acceptDivergenceOnInvoice(self, invoice, divergence_list):
builder_list = invoice.getBuilderList()
self.assertEquals(2, len(builder_list))
for builder in builder_list:
builder.solveDivergence(invoice.getRelativeUrl(),
divergence_to_accept_list=divergence_list)
def _adoptDivergenceOnPackingList(self, packing_list, divergence_list): def _adoptDivergenceOnPackingList(self, packing_list, divergence_list):
builder_list = packing_list.getBuilderList() builder_list = packing_list.getBuilderList()
for builder in builder_list: for builder in builder_list:
builder.solveDivergence(packing_list.getRelativeUrl(), builder.solveDivergence(packing_list.getRelativeUrl(),
divergence_to_adopt_list=divergence_list) divergence_to_adopt_list=divergence_list)
def _adoptDivergenceOnInvoice(self, invoice, divergence_list):
builder_list = invoice.getBuilderList()
self.assertEquals(2, len(builder_list))
for builder in builder_list:
builder.solveDivergence(invoice.getRelativeUrl(),
divergence_to_adopt_list=divergence_list)
def test_accept_quantity_divergence_on_invoice_with_started_packing_list( def test_accept_quantity_divergence_on_invoice_with_started_packing_list(
self, quiet=quiet): self, quiet=quiet):
# only applies to sale invoice, because purchase invoices are not built yet # only applies to sale invoice, because purchase invoices are not built yet
......
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