diff --git a/openerp/tests/test_mail.py b/openerp/tests/test_mail.py index fd27ebdf833..55265760627 100755 --- a/openerp/tests/test_mail.py +++ b/openerp/tests/test_mail.py @@ -230,6 +230,12 @@ class TestCleaner(unittest2.TestCase): for ext in test_mail_examples.BUG_1_OUT: self.assertNotIn(ext, new_html, 'html_email_cleaner did not removed invalid content') + new_html = html_email_clean(test_mail_examples.BUG2, remove=True, shorten=True, max_length=100) + for ext in test_mail_examples.BUG_2_IN: + self.assertIn(ext, new_html, 'html_email_cleaner wrongly removed valid content') + for ext in test_mail_examples.BUG_2_OUT: + self.assertNotIn(ext, new_html, 'html_email_cleaner did not removed invalid content') + def test_90_misc(self): # False boolean for text must return empty string new_html = html_email_clean(False) diff --git a/openerp/tests/test_mail_examples.py b/openerp/tests/test_mail_examples.py index 9ad058c380b..54671106334 100644 --- a/openerp/tests/test_mail_examples.py +++ b/openerp/tests/test_mail_examples.py @@ -693,3 +693,266 @@ BUG_1_OUT = [ '81.81.37.00', 'openerp.com', ] + + +BUG2 = """ +
| Subject: + | +Fwd: TR: OpenERP S.A. Payment Reminder | +
|---|---|
| Date: | +Wed, 16 Oct 2013 14:11:13 +0200 | +
| From: | +Christine Herrmann <che@openerp.com> | +
| To: | +online@openerp.com | +
| Sujet: + | +TR: OpenERP S.A. Payment Reminder | +
|---|---|
| Date : + | +Wed, 16 Oct 2013 10:34:45 -0000 | +
| De : | +Ida Siwatala <infos@inzoservices.com> | +
| Répondre + + à : | +catchall@openerp.my.openerp.com | +
| Pour : + | +Christine Herrmann (che) <che@openerp.com> | +
Bonjour,
++
+
Pourriez-vous + + me faire un retour sur ce point.
++
+
Cordialement
++
+
De :
+ Ida Siwatala [mailto:infos@inzoservices.com]
+
+ Envoyé : vendredi 4 octobre 2013 20:03
+ À : 'Followers of
+ INZO-services-8-all-e-Maxime-Lisbonne-77176-Savigny-le-temple-France'
+ Objet : RE: OpenERP S.A. Payment Reminder
+
Bonsoir,
++
+
Je + + me permets de revenir vers vous par écrit , car j’ai + fait 2 appels vers votre service en exposant mon + problème, mais je n’ai pas eu de retour.
+Cela + + fait un mois que j’ai fait la souscription de votre + produit, mais je me rends compte qu’il est pas adapté à + ma situation ( fonctionnalité manquante et surtout je + n’ai pas beaucoup de temps à passer à résoudre des + bugs).
+C’est + + pourquoi , j’ai demandé qu’un accord soit trouvé avec + vous pour annuler le contrat (tout en vous payant le + mois d’utilisation de septembre).
++
+
Pourriez-vous + + me faire un retour sur ce point.
++
+
Cordialement,
++
+
Ida + + Siwatala
++
+
De :
+ che@openerp.com
+ [mailto:che@openerp.com]
+
+ Envoyé : vendredi 4 octobre 2013 17:41
+ À : infos@inzoservices.com
+ Objet : OpenERP S.A. Payment Reminder
+
Dear + + INZO services,
+Exception + + made if there was a mistake of ours, it seems that the + following amount stays unpaid. Please, take + appropriate measures in order to carry out this + payment in the next 8 days.
++
+
|
+ Date de facturation + |
+
+ Description + |
+
+ Reference + |
+
+ Due Date + |
+
+ Amount (€) + |
+
+ Lit. + |
+
|
+ 2013-09-24 + |
+
+ 2013/1121 + |
+
+ Enterprise - Inzo Services + - Juillet 2013 + |
+
+ 2013-09-24 + |
+
+ 420.0 + |
+ + |
+
+ |
+ + |
+ + |
+ + |
+ + |
+ + |
+
Amount + + due : 420.00 €
+Would + + your payment have been carried out after this mail was + sent, please ignore this message. Do not hesitate to + contact our accounting department.
+
+ Best Regards,
+ Aurore Lesage
+ OpenERP
+ Chaussée de Namur, 40
+ B-1367 Grand Rosières
+ Tel: +32.81.81.37.00 - Fax: +32.81.73.35.01
+ E-mail : ale@openerp.com
+ Web: http://www.openerp.com
-- +Christine Herrmann + +OpenERP +Chaussée de Namur, 40 +B-1367 Grand Rosières +Tel: +32.81.81.37.00 - Fax: +32.81.73.35.01 + +Web: http://www.openerp.com+