Commit 3cbe2f62 authored by Gabriel Monnerat's avatar Gabriel Monnerat

validate document checking your mimetype, because it is more reliable than the...

validate document checking your mimetype, because it is more reliable than the output of the command

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@42113 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3a25805e
......@@ -81,9 +81,8 @@ class TestUnoConverter(CloudoooTestCase):
self.assertEquals(stderr, '')
output_url = stdout.replace('\n', '')
self.assertTrue(exists(output_url), stdout)
file_detector = magic.Magic()
magic_result = file_detector.from_buffer(output_url)
self.assertTrue(magic_result.startswith("ASCII text"))
mime = magic.Magic(mime=True)
self.assertEquals(mime.from_file(output_url), 'application/vnd.ms-office')
self.document.trash()
self.assertEquals(exists(output_url), False)
......
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