'Incoming email update discussion + notification email'

@mute_logger('odoo.addons.mail.models.mail_thread', 'odoo.models', 'odoo.addons.mail.models.mail_mail')
def test_message_process_alias_update(self):

    self.alias.write({'alias_force_thread_id': self.group_public.id})
    self.group_public.message_subscribe(partner_ids=[self.partner_1.id])
    new_groups = self.format_and_process(MAIL_TEMPLATE, email_from='valid.other@gmail.com', msg_id='<1198923581.41972151344608186799.JavaMail.diff1@agrolait.com>', to='groups@example.com>', subject='Re:    cats')
    self.assertEqual(len(new_groups), 0, 'message_process:    reply    on    Frogs    should    not    have    created    a    new    group    with    new    subject')
    self.assertEqual(len(self.group_public.message_ids), 2, 'message_process:    group    should    contain    one    new    message')
    self.assertEqual(len(self._mails), 1, 'message_process:    one    email    should    have    been    generated')
    self.assertIn('valid.lelitre@agrolait.com', self._mails[0].get('email_to')[0], 'message_process:    email    should    be    sent    to    Sylvie')
