tests: check content as bytes (#36515)

This commit is contained in:
Frédéric Péters 2019-11-15 14:56:16 +01:00
parent 10d4451122
commit 4c6c08dcae
1 changed files with 2 additions and 2 deletions

View File

@ -3088,7 +3088,7 @@ def test_formdata_attachment_download_to_backoffice_file_field(pub):
bo1 = formdata.data['bo1']
assert bo1.base_filename == 'test.txt'
assert bo1.content_type == 'text/plain'
assert bo1.get_content() == 'foobar'
assert bo1.get_content() == b'foobar'
# and file is in history, too
assert formdata.evolution[-1].parts[0].__class__.__name__ == 'AttachmentEvolutionPart'
@ -3139,7 +3139,7 @@ def test_formdata_attachment_download_to_backoffice_file_field_only(pub):
bo1 = formdata.data['bo1']
assert bo1.base_filename == 'test.txt'
assert bo1.content_type == 'text/plain'
assert bo1.get_content() == 'foobar'
assert bo1.get_content() == b'foobar'
# but nothing in history
for evo in formdata.evolution: