Commit 2c7959c0 authored by Jérome Perrin's avatar Jérome Perrin

testOooServer: fix test converting invalid file

This test tried tries to convert a broken file, but this broken file was
"not broken enough" and it managed to pass and reply with 200 OK.

Adjust the test to use a "more broken file" that actually cause a 402
return code.

This is because with libreoffice 7.5.2.2 that file was broken enough
to trigger the error, but changing here minimize the changes related to
libreoffice version up.
parent 75878185
...@@ -141,7 +141,7 @@ class TestConversion(TestCase): ...@@ -141,7 +141,7 @@ class TestConversion(TestCase):
# Test run_convert method with invalid file # Test run_convert method with invalid file
with open(join('data', 'test.doc'), 'rb') as f: with open(join('data', 'test.doc'), 'rb') as f:
scenario_list.append( scenario_list.append(
('test.doc', f.read()[:300], 200, '', ('test.doc', f.read()[:-300], 402, '',
['data', 'meta', 'mime'], '', 'application/vnd.oasis.opendocument.text' ['data', 'meta', 'mime'], '', 'application/vnd.oasis.opendocument.text'
)) ))
return scenario_list return scenario_list
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment