Commit 208817e5 authored by Jérome Perrin's avatar Jérome Perrin

testHalJsonStyle: py3

parent 021818a8
...@@ -3187,7 +3187,7 @@ class TestERP5ODS(ERP5HALJSONStyleSkinsMixin): ...@@ -3187,7 +3187,7 @@ class TestERP5ODS(ERP5HALJSONStyleSkinsMixin):
dialog_method='Base_viewAsODS', dialog_method='Base_viewAsODS',
dialog_id='Base_viewAsODSDialog', dialog_id='Base_viewAsODSDialog',
form_id='FooModule_viewFooList', form_id='FooModule_viewFooList',
) ).decode()
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)
if IS_ZOPE2: if IS_ZOPE2:
...@@ -3251,17 +3251,17 @@ class TestERP5ODS(ERP5HALJSONStyleSkinsMixin): ...@@ -3251,17 +3251,17 @@ class TestERP5ODS(ERP5HALJSONStyleSkinsMixin):
dialog_method='Base_viewAsODS', dialog_method='Base_viewAsODS',
dialog_id='Base_viewAsODSDialog', dialog_id='Base_viewAsODSDialog',
form_id='FooModule_viewFooList', form_id='FooModule_viewFooList',
) ).decode()
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)
if IS_ZOPE2: if IS_ZOPE2:
self.assertEqual(fake_request.RESPONSE.getHeader('Content-Type'), 'text/csv') self.assertEqual(fake_request.RESPONSE.getHeader('Content-Type'), 'text/csv')
else: else:
self.assertEqual(fake_request.RESPONSE.getHeader('Content-Type'), 'text/csv; charset=utf-8') self.assertEqual(fake_request.RESPONSE.getHeader('Content-Type'), 'text/csv; charset=utf-8')
self.assertTrue('foook1' in result, result) self.assertIn('foook1', result)
self.assertTrue('foook2' in result, result) self.assertIn('foook2', result)
self.assertTrue('foonotok' not in result, result) self.assertNotIn('foonotok', result)
# Check one of the field name # Check one of the field name
self.assertTrue('Read-Only Quantity' in result, result) self.assertIn('Read-Only Quantity', result)
# Ensure it is not the list mode rendering # Ensure it is not the list mode rendering
self.assertTrue(len(result.split('\n')) > 50, result) self.assertTrue(len(result.split('\n')) > 50, 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