From b4dc178588ad998cff28887c7ad4497e52efe0f9 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 19 Nov 2012 16:17:39 +0100 Subject: [PATCH] [IMP] tools.mail: add a test for html_email_clean function, if empty string bzr revid: chm@openerp.com-20121119151739-vcofz0abk7i71b3l --- openerp/tests/test_mail.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openerp/tests/test_mail.py b/openerp/tests/test_mail.py index 0ad6504a7ae..c58beecb4c4 100644 --- a/openerp/tests/test_mail.py +++ b/openerp/tests/test_mail.py @@ -173,6 +173,9 @@ class TestCleaner(unittest2.TestCase): new_html = html_email_clean(TEXT_TPL) self.assertNotIn('quote', new_html, 'html_email_cleaner did not remove correctly plaintext quotes') + # Test5: False boolean for text must return empty string + new_html = html_email_clean(False) + self.assertEqual('', new_html, 'html_email_cleaner did not change a False (boolean) in an empty string.') class TestHtmlTools(unittest2.TestCase): """ Test some of our generic utility functions about html """