diff --git a/pingen/tests/test_pingen.py b/pingen/tests/test_pingen.py index 8229ada1f78..31d1598fd22 100644 --- a/pingen/tests/test_pingen.py +++ b/pingen/tests/test_pingen.py @@ -178,11 +178,13 @@ def test_pingen_push_document(self): self.company._get_pingen_client() - attachment = self.env["ir.attachment"].search( - [("res_model", "=", "account.move")] - )[0] + attachment = self.env["ir.attachment"].create({ + "name": "in_invoice_yourcompany_demo.pdf", + "datas": base64.b64encode(bytes("", "utf8")), + "type": "binary", + }) attachment.write({"send_to_pingen": True}) - pingen_document = attachment.pingen_document_ids[0] + pingen_document = attachment.pingen_document_ids pingen_document.push_to_pingen() self.assertEqual(pingen_document.state, "pushed") diff --git a/test-requirements.txt b/test-requirements.txt index 9a7ce198f98..2c9c818c27c 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,3 @@ -vcr +vcrpy requests_mock freezegun