tests: check content as bytes (#36515)
This commit is contained in:
parent
10d4451122
commit
4c6c08dcae
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue