mirror of https://github.com/OCA/social.git
[FIX] pep8
parent
39ac1c5477
commit
c4e6a779a0
|
@ -26,6 +26,5 @@ class MailMessage(models.Model):
|
||||||
user_signature=user_signature)
|
user_signature=user_signature)
|
||||||
if not self.env.context.get('notify_followers'):
|
if not self.env.context.get('notify_followers'):
|
||||||
# Needaction only for recipients
|
# 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
|
return res
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,8 @@ class TestMailOptionalFollowernotifications(common.TransactionCase):
|
||||||
self.assertEqual(len(res.ids), 1)
|
self.assertEqual(len(res.ids), 1)
|
||||||
message = self.env['mail.message']
|
message = self.env['mail.message']
|
||||||
for record in res:
|
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]:
|
record.partner_ids.ids == [self.partner_03.id]:
|
||||||
message += record
|
message += record
|
||||||
self.assertEqual(len(message.ids), 0)
|
self.assertEqual(len(message.ids), 0)
|
||||||
|
@ -49,7 +50,8 @@ class TestMailOptionalFollowernotifications(common.TransactionCase):
|
||||||
('res_id', '=', self.partner_01.id)])
|
('res_id', '=', self.partner_01.id)])
|
||||||
message = self.env['mail.message']
|
message = self.env['mail.message']
|
||||||
for record in res:
|
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]:
|
record.partner_ids.ids == [self.partner_03.id]:
|
||||||
message += record
|
message += record
|
||||||
self.assertEqual(len(message.ids), 1)
|
self.assertEqual(len(message.ids), 1)
|
||||||
|
|
Loading…
Reference in New Issue