[FIX] report_py3o_fusion_server: requests.post returns bytes not str
parent
6b55c4ef0d
commit
2b64b6c0e0
|
@ -96,7 +96,7 @@ class Py3oReport(models.TransientModel):
|
|||
)
|
||||
|
||||
chunk_size = 1024
|
||||
with open(result_path, 'w+') as fd:
|
||||
with open(result_path, 'w+b') as fd:
|
||||
for chunk in r.iter_content(chunk_size):
|
||||
fd.write(chunk)
|
||||
end_chrono = datetime.now()
|
||||
|
|
|
@ -9,7 +9,7 @@ from odoo.addons.report_py3o.tests import test_report_py3o
|
|||
'requests.post', mock.Mock(
|
||||
return_value=mock.Mock(
|
||||
status_code=200,
|
||||
iter_content=mock.Mock(return_value=['test_result']),
|
||||
iter_content=mock.Mock(return_value=[b'test_result']),
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue