diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/mail/tests/test_update_notification.py | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/mail/tests/test_update_notification.py')
| -rw-r--r-- | addons/mail/tests/test_update_notification.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/addons/mail/tests/test_update_notification.py b/addons/mail/tests/test_update_notification.py new file mode 100644 index 00000000..7621e405 --- /dev/null +++ b/addons/mail/tests/test_update_notification.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +from odoo.tests.common import TransactionCase + + +class TestUpdateNotification(TransactionCase): + def test_user_count(self): + ping_msg = self.env['publisher_warranty.contract'].with_context(active_test=False)._get_message() + user_count = self.env['res.users'].search_count([('active', '=', True)]) + self.assertEqual(ping_msg.get('nbr_users'), user_count, 'Update Notification: Users count is badly computed in ping message') + share_user_count = self.env['res.users'].search_count([('active', '=', True), ('share', '=', True)]) + self.assertEqual(ping_msg.get('nbr_share_users'), share_user_count, 'Update Notification: Portal Users count is badly computed in ping message') |
