You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
779 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2017 LasLabs Inc.
  3. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
  4. from mock import patch
  5. from .bus_setup import BusSetup
  6. from ..status_constants import ONLINE
  7. AWAY_TIMER = 'odoo.addons.bus_presence_override.models.' \
  8. 'bus_presence.AWAY_TIMER'
  9. DISCONNECTION_TIMER = 'odoo.addons.bus_presence_override.models.' \
  10. 'bus_presence.DISCONNECTION_TIMER'
  11. class TestResPartner(BusSetup):
  12. @patch(AWAY_TIMER, 10000000)
  13. @patch(DISCONNECTION_TIMER, 10000000)
  14. def test_compute_im_status_online(self):
  15. """ It should be computed to online """
  16. self.pres_admin.status = ONLINE
  17. self.assertEquals(
  18. self.p_admin.im_status,
  19. ONLINE,
  20. )