Commit 26200864 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

similar test as r38517. check if getExtensibleContent() works for a root level zope user too.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38532 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2260ad0c
...@@ -1838,6 +1838,11 @@ return 1 ...@@ -1838,6 +1838,11 @@ return 1
""" """
Test extensible content of some DMS types. As this is possible only on URL traversal use publish. Test extensible content of some DMS types. As this is possible only on URL traversal use publish.
""" """
# Create a root level zope user
root_user_folder = self.getPortalObject().aq_parent.acl_users
if not root_user_folder.getUser('zope_user'):
root_user_folder._doAddUser('zope_user', '', ['Manager',], [])
transaction.commit()
# Create document with good content # Create document with good content
document = self.portal.document_module.newContent(portal_type='Presentation') document = self.portal.document_module.newContent(portal_type='Presentation')
upload_file = makeFileUpload('TEST-en-003.odp') upload_file = makeFileUpload('TEST-en-003.odp')
...@@ -1845,14 +1850,15 @@ return 1 ...@@ -1845,14 +1850,15 @@ return 1
self.stepTic() self.stepTic()
self.assertEquals('converted', document.getExternalProcessingState()) self.assertEquals('converted', document.getExternalProcessingState())
for object_url in ('img1.html', 'img2.html', 'text1.html', 'text2.html'): for object_url in ('img1.html', 'img2.html', 'text1.html', 'text2.html'):
response = self.publish('%s/%s' %(document.getPath(), object_url), for credential in ['ERP5TypeTestCase:', 'zope_user:']:
basic='ERP5TypeTestCase:') response = self.publish('%s/%s' %(document.getPath(), object_url),
self.assertTrue('Status: 200 OK' in response.getOutput()) basic=credential)
# OOod produced HTML navigation, test it self.assertTrue('Status: 200 OK' in response.getOutput())
self.assertTrue('First page' in response.getBody()) # OOod produced HTML navigation, test it
self.assertTrue('Back' in response.getBody()) self.assertTrue('First page' in response.getBody())
self.assertTrue('Continue' in response.getBody()) self.assertTrue('Back' in response.getBody())
self.assertTrue('Last page' in response.getBody()) self.assertTrue('Continue' in response.getBody())
self.assertTrue('Last page' in response.getBody())
def test_contributeLink(self): def test_contributeLink(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