Commit d4e889b3 authored by Julien Muchembled's avatar Julien Muchembled

TestERP5Web: check rst->html conversion

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41112 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0afe1bbb
......@@ -36,6 +36,7 @@ from AccessControl import Unauthorized
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import getSecurityManager
from Testing import ZopeTestCase
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.utils import DummyLocalizer
from Products.ERP5Type.tests.utils import createZODBPythonScript
......@@ -1310,9 +1311,20 @@ Hé Hé Hé!""", page.asText().strip())
self.assertEquals(1, self.portal.person_module.isEditableMode())
self.assertEquals(1, website.isEditableMode())
self.assertEquals(1, getattr(website, 'person_module').isEditableMode())
def test_20_reStructuredText(self):
def clearAllCache():
self.portal.portal_caches.clearAllCache()
getTransactionalVariable().clear()
web_page = self.portal.web_page_module.newContent(portal_type='Web Page',
content_type='text/x-rst',
text_content="`foo`")
clearAllCache()
self.assertTrue('<cite>foo</cite>' in web_page.asEntireHTML(charset='utf-8'))
# XXX: It currently fails if charset is not given. Is it normal ?
clearAllCache()
self.assertTrue('<cite>foo</cite>' in web_page.asEntireHTML())
class TestERP5WebWithSimpleSecurity(ERP5TypeTestCase):
"""
......
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