[Erp5-report] r33794 yo - /erp5/trunk/products/ERP5/tests/testNotificationMessageModule.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Mar 17 13:00:50 CET 2010
Author: yo
Date: Wed Mar 17 13:00:47 2010
New Revision: 33794
URL: http://svn.erp5.org?rev=33794&view=rev
Log:
w3m_dump seems to want to append a newline from time to time, so make it sure to ignore if the text ends with a newline or not by stripping.
Modified:
erp5/trunk/products/ERP5/tests/testNotificationMessageModule.py
Modified: erp5/trunk/products/ERP5/tests/testNotificationMessageModule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testNotificationMessageModule.py?rev=33794&r1=33793&r2=33794&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testNotificationMessageModule.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testNotificationMessageModule.py [utf8] Wed Mar 17 13:00:47 2010
@@ -126,7 +126,7 @@
mime, text = doc.convert('txt')
self.assertEqual('text/plain', mime)
- self.assertEqual('substitution text: b', text)
+ self.assertEqual('substitution text: b', text.rstrip())
self.assertEqual('Test b', doc.asSubjectText())
@@ -147,7 +147,7 @@
mime, text = doc.convert('txt',
substitution_method_parameter_dict=dict(a='b'))
- self.assertEqual('substitution text: b', text)
+ self.assertEqual('substitution text: b', text.rstrip())
def test_substitution_content_and_convert(self):
@@ -165,7 +165,7 @@
'NotificationMessage_getDummySubstitionMapping')
mime, text = doc.convert('txt')
- self.assertEqual('substitution text: b', text)
+ self.assertEqual('substitution text: b', text.rstrip())
def test_safe_substitution_content(self):
"""Tests that 'safe' substitution is performed, unless safe_substitute is
@@ -183,7 +183,7 @@
'NotificationMessage_getDummySubstitionMapping')
mime, text = doc.convert('txt')
- self.assertEqual('substitution text: ${b}', text)
+ self.assertEqual('substitution text: ${b}', text.rstrip())
self.assertEqual('${b}', doc.asSubjectText())
self.assertRaises(KeyError, doc.convert, 'txt', safe_substitute=False)
More information about the Erp5-report
mailing list