Skip to content

Commit

Permalink
[IMP] account_cutoff_picking: Improve test structure to allow inherit…
Browse files Browse the repository at this point in the history
…ance
  • Loading branch information
rousseldenis authored and jbaudoux committed Oct 23, 2023
1 parent 09cb86c commit 6b3095a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion account_cutoff_picking/tests/test_cutoff_expense.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .common import TestAccountCutoffCutoffPickingCommon


class TestAccountCutoffCutoffExpense(TestAccountCutoffCutoffPickingCommon):
class AccountCutoffCutoffExpenseCommon(TestAccountCutoffCutoffPickingCommon):
@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down Expand Up @@ -87,6 +87,8 @@ def _create_po_invoice(self, date):
invoice_form.invoice_date = date
return invoice_form.save()


class TestAccountCutoffCutoffExpense(AccountCutoffCutoffExpenseCommon):
def test_accrued_expense_empty(self):
"""Test cutoff when there is no PO."""
cutoff = self.expense_cutoff
Expand Down
4 changes: 3 additions & 1 deletion account_cutoff_picking/tests/test_cutoff_revenue.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .common import TestAccountCutoffCutoffPickingCommon


class TestAccountCutoffCutoffRevenue(TestAccountCutoffCutoffPickingCommon):
class AccountCutoffCutoffRevenueCommon(TestAccountCutoffCutoffPickingCommon):
@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down Expand Up @@ -85,6 +85,8 @@ def _confirm_so_and_do_picking(self, qty_done):
"Delivered quantities are wrong after partial delivery",
)


class TestAccountCutoffCutoffRevenue(AccountCutoffCutoffRevenueCommon):
def test_accrued_revenue_empty(self):
"""Test cutoff when there is no SO."""
cutoff = self.revenue_cutoff
Expand Down

0 comments on commit 6b3095a

Please sign in to comment.