summaryrefslogtreecommitdiff
path: root/addons/mail/tests/test_mail_message.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2017-10-25 10:24:33 +0200
committerThibault Delavallée <tde@odoo.com>2017-11-29 10:05:01 +0100
commit2a3ac4ce22483035641e917edd60b69cd4d062e1 (patch)
tree2ea531c79393cec0f44a60867df08da49db5ffab /addons/mail/tests/test_mail_message.py
parent1cc1ef505828c9d89fff9c6217d477547ddc6fe8 (diff)
[MOV] mail: reorganize content of tests, separate tests from models and data
Purpose of this commit is to reorganize the mail tests. Containing * move test models into mail/tests/models/; * move data into mail/tests/data even if it is python code, as it is likely that some additional data will appear soon; * split test_mail_features into test for discuss app and test related to message post and composer, to better identify test target; * split and remove test_portal, those tests are now integrated in the other tests; There is no change in this commit. Only some renaming and file move or split. mergeup: remove / split test portal
Diffstat (limited to 'addons/mail/tests/test_mail_message.py')
-rw-r--r--addons/mail/tests/test_mail_message.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/addons/mail/tests/test_mail_message.py b/addons/mail/tests/test_mail_message.py
index 148ff0ed0d2..f8ae1064c80 100644
--- a/addons/mail/tests/test_mail_message.py
+++ b/addons/mail/tests/test_mail_message.py
@@ -266,25 +266,3 @@ class TestMailMessageAccess(TestMail):
def test_mail_message_access_create_reply(self):
self.message.write({'partner_ids': [(4, self.user_employee.partner_id.id)]})
self.env['mail.message'].sudo(self.user_employee).create({'model': 'mail.channel', 'res_id': self.group_private.id, 'body': 'Test', 'parent_id': self.message.id})
-
- def test_message_set_star(self):
- msg = self.test_pigs.message_post(body='My Body', subject='1')
- msg_emp = self.env['mail.message'].sudo(self.user_employee).browse(msg.id)
-
- # Admin set as starred
- msg.toggle_message_starred()
- self.assertTrue(msg.starred)
-
- # Employee set as starred
- msg_emp.toggle_message_starred()
- self.assertTrue(msg_emp.starred)
-
- # Do: Admin unstars msg
- msg.toggle_message_starred()
- self.assertFalse(msg.starred)
- self.assertTrue(msg_emp.starred)
-
- def test_60_cache_invalidation(self):
- msg_cnt = len(self.test_pigs.message_ids)
- self.test_pigs.message_post(body='Hi!', subject='test')
- self.assertEqual(len(self.test_pigs.message_ids), msg_cnt + 1)