Skip to content

Commit

Permalink
edi_sale_oca: improve test mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
simahawk committed Nov 18, 2024
1 parent d023bb5 commit 15a9309
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions edi_sale_oca/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ def _setup_order(cls, **kw):
if line_defaults:
for line in vals["order_line"]:
line.update(line_defaults)
cls.sale = cls._create_sale_order(**vals)
cls.sale.action_confirm()
sale = cls._create_sale_order(**vals)
sale.action_confirm()
return sale
4 changes: 2 additions & 2 deletions edi_sale_oca/tests/test_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setUpClass(cls):
cls.exc_record_in = cls.backend.create_record(
cls.exchange_type_in.code, {"edi_exchange_state": "input_received"}
)
cls._setup_order(
cls.order = cls._setup_order(
origin_exchange_record_id=cls.exc_record_in.id,
)

Expand All @@ -29,7 +29,7 @@ def _get_backend(cls):
return cls.env.ref("edi_sale_oca.demo_edi_backend")

def test_line_origin(self):
order = self.sale
order = self.order
self.assertEqual(order.origin_exchange_record_id, self.exc_record_in)
lines = order.order_line
self.env["sale.order.line"].create(
Expand Down

0 comments on commit 15a9309

Please sign in to comment.