From c4e6a779a0094e5016bdd835d76d96547d6d64d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul=20=28ACSONE=29?= Date: Mon, 26 Dec 2016 14:55:56 +0100 Subject: [PATCH] [FIX] pep8 --- mail_optional_follower_notification/models/mail_message.py | 3 +-- .../tests/test_mail_optional_follower_notifications.py | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mail_optional_follower_notification/models/mail_message.py b/mail_optional_follower_notification/models/mail_message.py index 4768bb819..84666b683 100644 --- a/mail_optional_follower_notification/models/mail_message.py +++ b/mail_optional_follower_notification/models/mail_message.py @@ -26,6 +26,5 @@ class MailMessage(models.Model): user_signature=user_signature) if not self.env.context.get('notify_followers'): # Needaction only for recipients - self.needaction_partner_ids = [(6, 0, self.partner_ids.ids)] + self.needaction_partner_ids = [(6, 0, self.partner_ids.ids)] return res - diff --git a/mail_optional_follower_notification/tests/test_mail_optional_follower_notifications.py b/mail_optional_follower_notification/tests/test_mail_optional_follower_notifications.py index 919367287..67b26afff 100644 --- a/mail_optional_follower_notification/tests/test_mail_optional_follower_notifications.py +++ b/mail_optional_follower_notification/tests/test_mail_optional_follower_notifications.py @@ -36,7 +36,8 @@ class TestMailOptionalFollowernotifications(common.TransactionCase): self.assertEqual(len(res.ids), 1) message = self.env['mail.message'] for record in res: - if record.notification_ids.mapped('res_partner_id').ids == [self.partner_03.id] and\ + if record.notification_ids.mapped('res_partner_id').ids == \ + [self.partner_03.id] and \ record.partner_ids.ids == [self.partner_03.id]: message += record self.assertEqual(len(message.ids), 0) @@ -49,7 +50,8 @@ class TestMailOptionalFollowernotifications(common.TransactionCase): ('res_id', '=', self.partner_01.id)]) message = self.env['mail.message'] for record in res: - if record.notification_ids.mapped('res_partner_id').ids == [self.partner_03.id] and\ + if record.notification_ids.mapped('res_partner_id').ids == \ + [self.partner_03.id] and\ record.partner_ids.ids == [self.partner_03.id]: message += record self.assertEqual(len(message.ids), 1)