Commit 4cdfffb3 authored by Rafael Monnerat's avatar Rafael Monnerat

Do not decode twice the same data

The _getFileType already process decodestring() with the data.
parent b11198dd
...@@ -46,7 +46,7 @@ class TestLegacyInterface(TestCase): ...@@ -46,7 +46,7 @@ class TestLegacyInterface(TestCase):
'text/html') 'text/html')
self.assertEquals(response_dict['mime'], 'text/html') self.assertEquals(response_dict['mime'], 'text/html')
self.assertEquals(self._getFileType(decodestring(response_dict['data'])), self.assertEquals(self._getFileType(response_dict['data']),
'text/html') 'text/html')
def testHtmlToOdt(self): def testHtmlToOdt(self):
...@@ -61,7 +61,7 @@ class TestLegacyInterface(TestCase): ...@@ -61,7 +61,7 @@ class TestLegacyInterface(TestCase):
'text/html') 'text/html')
self.assertEquals(response_dict['mime'], 'application/vnd.oasis.opendocument.text') self.assertEquals(response_dict['mime'], 'application/vnd.oasis.opendocument.text')
self.assertEquals(self._getFileType(decodestring(response_dict['data'])), self.assertEquals(self._getFileType(response_dict['data']),
'application/vnd.oasis.opendocument.text') 'application/vnd.oasis.opendocument.text')
def test_suite(): def test_suite():
......
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