[Erp5-report] r8471 - /erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jul 18 13:40:02 CEST 2006
Author: jerome
Date: Tue Jul 18 13:39:57 2006
New Revision: 8471
URL: http://svn.erp5.org?rev=8471&view=rev
Log:
- tweak iHotFix patchs to use an unicode safe StringIO implementation
- install Zelenium product, so that we can install business templates
containing zuites
Modified:
erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py
Modified: erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py?rev=8471&r1=8470&r2=8471&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py (original)
+++ erp5/trunk/products/ERP5Type/tests/ERP5TypeTestCase.py Tue Jul 18 13:39:57 2006
@@ -49,12 +49,23 @@
ZopeTestCase.installProduct('PythonScripts')
ZopeTestCase.installProduct('ExternalMethod')
try:
+ # Workaround iHotFix patch that doesn't work with
+ # ZopeTestCase REQUESTs
ZopeTestCase.installProduct('iHotfix')
from Products import iHotfix
- from StringIO import StringIO
+ from StringIO import StringIO as OrigStringIO
+ from types import UnicodeType
# revert monkey patchs from iHotfix
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:
pass
ZopeTestCase.installProduct('Localizer')
@@ -81,15 +92,16 @@
# Debugging
ZopeTestCase.installProduct('VerboseSecurity')
+ZopeTestCase.installProduct('Zelenium')
# ERP5
ZopeTestCase.installProduct('CMFActivity')
ZopeTestCase.installProduct('ERP5Catalog')
ZopeTestCase.installProduct('ERP5Type')
-ZopeTestCase.installProduct('ERP5Form') # Not required by ERP5Type but required by ERP5Form
+ZopeTestCase.installProduct('ERP5Form')
ZopeTestCase.installProduct('ERP5SyncML')
ZopeTestCase.installProduct('CMFCategory')
-ZopeTestCase.installProduct('ERP5') # Not needed by ERP5Type
+ZopeTestCase.installProduct('ERP5')
ZopeTestCase.installProduct('ZMySQLDDA')
# Install everything else which looks like related to ERP5
More information about the Erp5-report
mailing list