diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-01-23 14:33:53 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-01-23 14:33:53 +0100 |
| commit | 6c4389df41fb29f9707b205a8dcca13b3bf8a322 (patch) | |
| tree | b06358fdcff3268574c9ccda8cb36d9f94eb09dd /addons/mail/tests/test_mail_features.py | |
| parent | 255de893300d73670a15a102e85162ae48084d7c (diff) | |
| parent | 6804085b8ceb1411a23db65477f84a959f8c5bf7 (diff) | |
[MERGE] forward port branch 10.0 up to 6804085b8ce
Diffstat (limited to 'addons/mail/tests/test_mail_features.py')
| -rw-r--r-- | addons/mail/tests/test_mail_features.py | 11 |
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 |
