Skip to content
Snippets Groups Projects
Unverified Commit e0cbb058 authored by Damien Bouvy's avatar Damien Bouvy
Browse files

[IMP] mail: add basic for update notification (ping)

Ensures no regression on a3509d28
parent 106840c3
No related branches found
No related tags found
No related merge requests found
......@@ -10,3 +10,4 @@ import test_message_track
import test_mail_template
import test_invite
import test_ir_actions
import test_update_notification
# -*- 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')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment