summaryrefslogtreecommitdiff
path: root/addons/mail/tests/test_mail_features.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/mail/tests/test_mail_features.py')
-rw-r--r--addons/mail/tests/test_mail_features.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/addons/mail/tests/test_mail_features.py b/addons/mail/tests/test_mail_features.py
index 678ffb8c434..729f2df07b6 100644
--- a/addons/mail/tests/test_mail_features.py
+++ b/addons/mail/tests/test_mail_features.py
@@ -12,6 +12,17 @@ class TestMailFeatures(TestMail):
alias = self.env['mail.alias'].with_context(alias_model_name='mail.channel').create({'alias_name': 'b4r+_#_R3wl$$'})
self.assertEqual(alias.alias_name, 'b4r+_-_r3wl-', 'Disallowed chars should be replaced by hyphens')
+ def test_10_cache_invalidation(self):
+ """ Test that creating a mail-thread record does not invalidate the whole cache. """
+ # make a new record in cache
+ record = self.env['res.partner'].new({'name': 'Brave New Partner'})
+ self.assertTrue(record.name)
+
+ # creating a mail-thread record should not invalidate the whole cache
+ self.env['res.partner'].create({'name': 'Actual Partner'})
+ self.assertTrue(record.name)
+
+
@mute_logger('odoo.addons.mail.models.mail_mail')
def test_needaction(self):
na_emp1_base = self.group_pigs.sudo(self.user_employee).message_needaction_counter