Commit 516a8b78 authored by Nicolas Delaby's avatar Nicolas Delaby

* This test needs erp5_base to access Document_checkConversionFormatPermission

* content-disposition header is now qualified as attachment, not inline.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35401 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cac9f59e
# -*- coding: utf-8 -*-
############################################################################## ##############################################################################
# #
# Copyright (c) 2004, 2005, 2006 Nexedi SARL and Contributors. # Copyright (c) 2004, 2005, 2006 Nexedi SARL and Contributors.
...@@ -49,7 +50,7 @@ class TestOoodResponse(ERP5TypeTestCase): ...@@ -49,7 +50,7 @@ class TestOoodResponse(ERP5TypeTestCase):
newSecurityManager(None, user) newSecurityManager(None, user)
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
return () return ('erp5_base',)
def afterSetUp(self): def afterSetUp(self):
self.login() self.login()
...@@ -77,7 +78,7 @@ class TestOoodResponse(ERP5TypeTestCase): ...@@ -77,7 +78,7 @@ class TestOoodResponse(ERP5TypeTestCase):
ERP5Site_viewNothingAsOdt(batch_mode=0) ERP5Site_viewNothingAsOdt(batch_mode=0)
self.assertEqual('application/vnd.oasis.opendocument.text', self.assertEqual('application/vnd.oasis.opendocument.text',
request.RESPONSE.getHeader('content-type').split(';')[0]) request.RESPONSE.getHeader('content-type').split(';')[0])
self.assertEqual('inline;filename="ERP5Site_viewNothingAsOdt.odt"', self.assertEqual('attachment; filename="ERP5Site_viewNothingAsOdt.odt"',
request.RESPONSE.getHeader('content-disposition')) request.RESPONSE.getHeader('content-disposition'))
def test_01b_noExcEmptyFormatNoBatchMode(self): def test_01b_noExcEmptyFormatNoBatchMode(self):
...@@ -87,7 +88,7 @@ class TestOoodResponse(ERP5TypeTestCase): ...@@ -87,7 +88,7 @@ class TestOoodResponse(ERP5TypeTestCase):
ERP5Site_viewNothingAsOdt(format='', batch_mode=0) ERP5Site_viewNothingAsOdt(format='', batch_mode=0)
self.assertEqual('application/vnd.oasis.opendocument.text', self.assertEqual('application/vnd.oasis.opendocument.text',
request.RESPONSE.getHeader('content-type').split(';')[0]) request.RESPONSE.getHeader('content-type').split(';')[0])
self.assertEqual('inline;filename="ERP5Site_viewNothingAsOdt.odt"', self.assertEqual('attachment; filename="ERP5Site_viewNothingAsOdt.odt"',
request.RESPONSE.getHeader('content-disposition')) request.RESPONSE.getHeader('content-disposition'))
def test_02_noExcNoFormatBatchMode(self): def test_02_noExcNoFormatBatchMode(self):
......
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