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.

34 lines
1.4 KiB

  1. # Copyright (C) 2019 Open Source Integrators
  2. # <https://www.opensourceintegrators.com>
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  4. from odoo.tests.common import TransactionCase
  5. class TestBackendVoicent(TransactionCase):
  6. def setUp(self):
  7. super(TestBackendVoicent, self).setUp()
  8. self.backend_voicent_model = self.env['backend.voicent']
  9. self.backend_voicent_id = self.backend_voicent_model.create(
  10. {'host': 'localhost',
  11. 'port': '8155',
  12. 'is_active': True,
  13. 'call_line_ids': [(0, 0,
  14. {'name': 'call 1',
  15. 'applies_on': False,
  16. 'voicent_app': 'App'})],
  17. 'time_line_ids': [(0, 0, {'name': 'Call Time 1',
  18. 'time': 10.0}),
  19. (0, 0, {'name': 'Call Time 2',
  20. 'time': 11.0}),
  21. (0, 0, {'name': 'Call Time 3',
  22. 'time': 12.0}),
  23. (0, 0, {'name': 'Call Time 4',
  24. 'time': 13.0})]
  25. })
  26. def test_run_check_the_voicent_status(self):
  27. """To call the scheduler method."""
  28. self.backend_voicent_id._run_check_the_voicent_status()