Skip to content

Commit

Permalink
fixup! fixup! fixup! Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaniszewska-dev committed Oct 5, 2023
1 parent b2c95f3 commit bd131ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions pingen/tests/test_pingen.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright 2023 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)


import base64
import json
import logging
from os.path import dirname, join
Expand Down Expand Up @@ -178,11 +178,15 @@ 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")

Expand Down
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
vcr
vcrpy
requests_mock
freezegun

0 comments on commit bd131ed

Please sign in to comment.