test_utils_conversion: read files in binary mode (#38781)
This commit is contained in:
parent
3b6486d5cd
commit
85676130c2
|
@ -4,9 +4,9 @@ from passerelle.utils.conversion import to_pdf
|
|||
|
||||
|
||||
def test_pdf_to_pdf_do_nothing():
|
||||
pdf = open(os.path.join(os.path.dirname(__file__), 'data', 'minimal.pdf')).read()
|
||||
pdf = open(os.path.join(os.path.dirname(__file__), 'data', 'minimal.pdf'), 'rb').read()
|
||||
assert to_pdf(pdf) == pdf
|
||||
pdf = open(os.path.join(os.path.dirname(__file__), 'data', 'minimal_bom.pdf')).read()
|
||||
pdf = open(os.path.join(os.path.dirname(__file__), 'data', 'minimal_bom.pdf'), 'rb').read()
|
||||
assert to_pdf(pdf) == pdf
|
||||
pdf = open(os.path.join(os.path.dirname(__file__), 'data', 'minimal_bomutf8.pdf')).read()
|
||||
pdf = open(os.path.join(os.path.dirname(__file__), 'data', 'minimal_bomutf8.pdf'), 'rb').read()
|
||||
assert to_pdf(pdf) == pdf
|
||||
|
|
Loading…
Reference in New Issue