Commit 2256c9ed authored by Jérome Perrin's avatar Jérome Perrin

- tweak iHotFix patchs to use an unicode safe StringIO implementation

- install Zelenium product, so that we can install business templates
  containing zuites



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8471 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3ada191d
...@@ -49,12 +49,23 @@ ZopeTestCase.installProduct('PageTemplates') ...@@ -49,12 +49,23 @@ ZopeTestCase.installProduct('PageTemplates')
ZopeTestCase.installProduct('PythonScripts') ZopeTestCase.installProduct('PythonScripts')
ZopeTestCase.installProduct('ExternalMethod') ZopeTestCase.installProduct('ExternalMethod')
try: try:
# Workaround iHotFix patch that doesn't work with
# ZopeTestCase REQUESTs
ZopeTestCase.installProduct('iHotfix') ZopeTestCase.installProduct('iHotfix')
from Products import iHotfix from Products import iHotfix
from StringIO import StringIO from StringIO import StringIO as OrigStringIO
from types import UnicodeType
# revert monkey patchs from iHotfix # revert monkey patchs from iHotfix
iHotfix.get_request = get_request iHotfix.get_request = get_request
iHotfix.iHotfixStringIO = StringIO
class UnicodeSafeStringIO(OrigStringIO):
"""StringIO like class which never fails with unicode."""
def write(self, s):
if isinstance(s, UnicodeType):
s = s.encode('utf8', 'repr')
OrigStringIO.write(self, s)
# iHotFix will patch PageTemplate StringIO with
iHotfix.iHotfixStringIO = UnicodeSafeStringIO
except ImportError: except ImportError:
pass pass
ZopeTestCase.installProduct('Localizer') ZopeTestCase.installProduct('Localizer')
...@@ -81,15 +92,16 @@ ZopeTestCase.installProduct('ERP5Security') ...@@ -81,15 +92,16 @@ ZopeTestCase.installProduct('ERP5Security')
# Debugging # Debugging
ZopeTestCase.installProduct('VerboseSecurity') ZopeTestCase.installProduct('VerboseSecurity')
ZopeTestCase.installProduct('Zelenium')
# ERP5 # ERP5
ZopeTestCase.installProduct('CMFActivity') ZopeTestCase.installProduct('CMFActivity')
ZopeTestCase.installProduct('ERP5Catalog') ZopeTestCase.installProduct('ERP5Catalog')
ZopeTestCase.installProduct('ERP5Type') ZopeTestCase.installProduct('ERP5Type')
ZopeTestCase.installProduct('ERP5Form') # Not required by ERP5Type but required by ERP5Form ZopeTestCase.installProduct('ERP5Form')
ZopeTestCase.installProduct('ERP5SyncML') ZopeTestCase.installProduct('ERP5SyncML')
ZopeTestCase.installProduct('CMFCategory') ZopeTestCase.installProduct('CMFCategory')
ZopeTestCase.installProduct('ERP5') # Not needed by ERP5Type ZopeTestCase.installProduct('ERP5')
ZopeTestCase.installProduct('ZMySQLDDA') ZopeTestCase.installProduct('ZMySQLDDA')
# Install everything else which looks like related to ERP5 # Install everything else which looks like related to ERP5
......
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