summaryrefslogtreecommitdiff
path: root/addons/mail/tests/test_invite.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2017-11-21 13:34:51 +0100
committerThibault Delavallée <tde@odoo.com>2017-11-29 10:11:15 +0100
commitd040bfde89fca1c702e6e95c3b808e0b48c2267a (patch)
tree78f4d11e9d1194c878f89be61a4a4b8140b7e5da /addons/mail/tests/test_invite.py
parent7a136d6acc3467504e7d6deed7482395e4d55bd8 (diff)
[MOV] (test_)mail: move tests into their dedicated module
Purpose: avoid having useless tables for test models in a production environment.
Diffstat (limited to 'addons/mail/tests/test_invite.py')
-rw-r--r--addons/mail/tests/test_invite.py29
1 files changed, 0 insertions, 29 deletions
diff --git a/addons/mail/tests/test_invite.py b/addons/mail/tests/test_invite.py
deleted file mode 100644
index bb50b3f1dc9..00000000000
--- a/addons/mail/tests/test_invite.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-# Part of Odoo. See LICENSE file for full copyright and licensing details.
-
-from odoo.addons.mail.tests import common
-from odoo.tools import mute_logger
-
-
-class TestInvite(common.BaseFunctionalTest, common.MockEmails):
-
- @mute_logger('odoo.addons.mail.models.mail_mail')
- def test_invite_email(self):
- test_partner = self.env['res.partner'].with_context(self._quick_create_ctx).create({
- 'name': 'Valid Lelitre',
- 'email': 'valid.lelitre@agrolait.com'})
-
- mail_invite = self.env['mail.wizard.invite'].with_context({
- 'default_res_model': 'mail.test.simple',
- 'default_res_id': self.test_record.id
- }).sudo(self.user_employee.id).create({
- 'partner_ids': [(4, test_partner.id), (4, self.user_admin.partner_id.id)],
- 'send_mail': True})
- mail_invite.add_followers()
-
- # check added followers and that emails were sent
- self.assertEqual(self.test_record.message_partner_ids,
- test_partner | self.user_admin.partner_id)
- self.assertEqual(self.test_record.message_follower_ids.mapped('channel_id'),
- self.env['mail.channel'])
- self.assertEqual(len(self._mails), 2)