From b394fa9ce0c0ce9a9892d61c73b5e2010d4e3244 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Mon, 17 Dec 2012 10:53:13 +0530 Subject: [PATCH] [IMP] improve code in test bzr revid: fka@tinyerp.com-20121217052313-2cgeorb37n1dcv1v --- addons/mail/tests/test_message_read.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/mail/tests/test_message_read.py b/addons/mail/tests/test_message_read.py index ebb39c92a02..3484b684e6d 100644 --- a/addons/mail/tests/test_message_read.py +++ b/addons/mail/tests/test_message_read.py @@ -41,6 +41,10 @@ class test_mail_access_rights(TestMailBase): msg_id8 = self.group_pigs.message_post(body='2-1-1', subtype='mt_comment', parent_id=msg_id4) msg_id9 = self.group_pigs.message_post(body='1-1-1', subtype='mt_comment', parent_id=msg_id3) msg_id10 = self.group_pigs.message_post(body='2-1-1', subtype='mt_comment', parent_id=msg_id4) + # list of child message id + child_msg_id = [msg_id3, msg_id4,msg_id5,msg_id6,msg_id7,msg_id8,msg_id9,msg_id10] + # update notified_partner_ids in all child message for the subscribe message + self.mail_message.write(cr, uid, child_msg_id, {'notified_partner_ids': [(6, 0, [user_admin.id])]}) msg_ids = [msg_id10, msg_id9, msg_id8, msg_id7, msg_id6, msg_id5, msg_id4, msg_id3, msg_id2, msg_id1, msg_id0] ordered_msg_ids = [msg_id2, msg_id4, msg_id6, msg_id8, msg_id10, msg_id1, msg_id3, msg_id5, msg_id7, msg_id9, msg_id0]