Commit fd0ec9b3 authored by Jérome Perrin's avatar Jérome Perrin

Update tests for cloudooo using Libreoffice 7.5.2.2

after we updated cloudooo.erp5.net with cloudooo!32

See merge request !1785
parents 68de6f7e da6b15b0
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import transaction import transaction
from zExceptions import Unauthorized from zExceptions import Unauthorized
from Products.ERP5Type.tests.utils import createZODBPythonScript from Products.ERP5Type.tests.utils import createZODBPythonScript
from Products.ERP5Type import IS_ZOPE2
from unittest import skip from unittest import skip
from functools import wraps from functools import wraps
...@@ -3180,7 +3181,10 @@ class TestERP5ODS(ERP5HALJSONStyleSkinsMixin): ...@@ -3180,7 +3181,10 @@ class TestERP5ODS(ERP5HALJSONStyleSkinsMixin):
) )
self.assertEqual(fake_request.get('portal_skin'), 'ODS') self.assertEqual(fake_request.get('portal_skin'), 'ODS')
self.assertEqual(fake_request.RESPONSE.status, 200) self.assertEqual(fake_request.RESPONSE.status, 200)
self.assertEqual(fake_request.RESPONSE.getHeader('Content-Type'), 'application/csv') if IS_ZOPE2:
self.assertEqual(fake_request.RESPONSE.getHeader('Content-Type'), 'text/csv')
else:
self.assertEqual(fake_request.RESPONSE.getHeader('Content-Type'), 'text/csv; charset=utf-8')
expected_csv = 'Title,Creation Date\nfoook2,XX/XX/XXXX XX:XX:XX\nfoook1,XX/XX/XXXX XX:XX:XX\n' expected_csv = 'Title,Creation Date\nfoook2,XX/XX/XXXX XX:XX:XX\nfoook1,XX/XX/XXXX XX:XX:XX\n'
self.assertEqual(len(result), len(expected_csv), result) self.assertEqual(len(result), len(expected_csv), result)
prefix_length = len('Title,Creation Date\nfoook2,') prefix_length = len('Title,Creation Date\nfoook2,')
...@@ -3241,7 +3245,10 @@ class TestERP5ODS(ERP5HALJSONStyleSkinsMixin): ...@@ -3241,7 +3245,10 @@ class TestERP5ODS(ERP5HALJSONStyleSkinsMixin):
) )
self.assertEqual(fake_request.get('portal_skin'), 'ODS') self.assertEqual(fake_request.get('portal_skin'), 'ODS')
self.assertEqual(fake_request.RESPONSE.status, 200) self.assertEqual(fake_request.RESPONSE.status, 200)
self.assertEqual(fake_request.RESPONSE.getHeader('Content-Type'), 'application/csv') if IS_ZOPE2:
self.assertEqual(fake_request.RESPONSE.getHeader('Content-Type'), 'text/csv')
else:
self.assertEqual(fake_request.RESPONSE.getHeader('Content-Type'), 'text/csv; charset=utf-8')
self.assertTrue('foook1' in result, result) self.assertTrue('foook1' in result, result)
self.assertTrue('foook2' in result, result) self.assertTrue('foook2' in result, result)
self.assertTrue('foonotok' not in result, result) self.assertTrue('foonotok' not in result, result)
......
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