From f67c1d5fe1e4402af98c499ff40a93fc7d8746b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20D=C3=ADaz?= Date: Mon, 22 Jul 2019 20:36:31 +0200 Subject: [PATCH] [IMP] mail_tracking: Adapt test to set (not order preserved) --- mail_tracking/i18n/mail_tracking.pot | 4 ++-- mail_tracking/tests/test_mail_tracking.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mail_tracking/i18n/mail_tracking.pot b/mail_tracking/i18n/mail_tracking.pot index d5bfda8..f9e75ab 100644 --- a/mail_tracking/i18n/mail_tracking.pot +++ b/mail_tracking/i18n/mail_tracking.pot @@ -54,8 +54,8 @@ msgid "Bounced" msgstr "" #. module: mail_tracking -#: code:addons/mail_tracking/models/mail_thread.py:36 -#: code:addons/mail_tracking/models/mail_thread.py:41 +#: code:addons/mail_tracking/models/mail_thread.py:39 +#: code:addons/mail_tracking/models/mail_thread.py:43 #: model:ir.model.fields,field_description:mail_tracking.field_mail_compose_message__email_cc #: model:ir.model.fields,field_description:mail_tracking.field_mail_message__email_cc #, python-format diff --git a/mail_tracking/tests/test_mail_tracking.py b/mail_tracking/tests/test_mail_tracking.py index ba6211a..5b879d8 100644 --- a/mail_tracking/tests/test_mail_tracking.py +++ b/mail_tracking/tests/test_mail_tracking.py @@ -138,8 +138,10 @@ class TestMailTracking(TransactionCase): self.assertFalse(email_cc[1]) # suggested recipients recipients = self.recipient.message_get_suggested_recipients() - self.assertEqual(recipients[self.recipient.id][0][1], - 'unnamed@test.com') + suggested_mails = { + email[1] for email in recipients[self.recipient.id] + } + self.assertTrue('unnamed@test.com' in suggested_mails) self.assertEqual(len(recipients[self.recipient.id][0]), 3) # Repeated Cc recipients message = self.env['mail.message'].create({