diff options
| author | Xavier Morel <xmo@odoo.com> | 2017-05-17 10:59:41 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2017-08-20 23:25:54 +0200 |
| commit | 200612ca1ef1a1bf75dbe52feef5a09ae5a58ca6 (patch) | |
| tree | c9243ec052649007c3c0c083b71cd290bc923f1a /addons/mail/tests/test_mail_features.py | |
| parent | ae866acf08abe91fe87a3d3f4899070962b795cc (diff) | |
[FIX] P3: text model in various mail bits
No formal decision there, and the stdlib API seems like a PITA as it's
based around native strings, not bytes and not text.
* try to use cross-model API instead of random encode/decode
* unicode all the mail_template things
* formataddr *requires* a text tuple now
In P2, formataddr((False, False)) "worked" (generated "False
<False>"), in P3 it will fail and blow up.
* attachments are quite definitely bytes
* remove try_coerce_ascii because it's garbage
Diffstat (limited to 'addons/mail/tests/test_mail_features.py')
| -rw-r--r-- | addons/mail/tests/test_mail_features.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/tests/test_mail_features.py b/addons/mail/tests/test_mail_features.py index a6fce59c10a..8e2264ad6d3 100644 --- a/addons/mail/tests/test_mail_features.py +++ b/addons/mail/tests/test_mail_features.py @@ -131,7 +131,7 @@ class TestMessagePost(TestMail): self.assertEqual(set(msg.attachment_ids.mapped('res_id')), set([self.test_pigs.id]), 'message_post: all atttachments should be linked to the pigs group') self.assertEqual(set([base64.b64decode(x) for x in msg.attachment_ids.mapped('datas')]), - set(['migration test', _attachments[0][1], _attachments[1][1]])) + set([b'migration test', _attachments[0][1], _attachments[1][1]])) self.assertTrue(set([_attach_1.id, _attach_2.id]).issubset(msg.attachment_ids.ids), 'message_post: mail.message attachments duplicated') # notifications |
