Skip to content

Commit

Permalink
edi: fix backend jobs test old api
Browse files Browse the repository at this point in the history
The recommended way to execute actions on records
is to call `action_exchange_*` on
  • Loading branch information
simahawk committed Jul 6, 2023
1 parent ccd9397 commit 2a56439
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions edi_oca/tests/test_backend_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ def setUp(self):
FakeOutputChecker.reset_faked()

def test_generate_record_output(self):
self.backend.with_context(fake_output="yeah!").exchange_generate(self.record)
self.record.with_context(fake_output="yeah!").action_exchange_generate()
self.assertEqual(self.record._get_file_content(), "yeah!")

def test_generate_record_output_pdf(self):
result = tools.file_open(
pdf_content = tools.file_open(
"result.pdf", subdir="addons/edi_oca/tests", mode="rb"
).read()
self.backend.with_context(fake_output=result).exchange_generate(self.record)
self.record.with_context(fake_output=pdf_content).action_exchange_generate()

def test_send_record(self):
self.record.write({"edi_exchange_state": "output_pending"})
Expand Down

0 comments on commit 2a56439

Please sign in to comment.