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.

37 lines
1.5 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. {'name': 'Test',
  11. 'host': 'localhost',
  12. 'port': '8155',
  13. 'callerid': '0000000000',
  14. 'line': '1',
  15. 'active': True,
  16. 'call_line_ids': [(0, 0,
  17. {'name': 'call 1',
  18. 'applies_on': False,
  19. 'msgtype': 'tts',
  20. 'msginfo': 'Hello World!'})],
  21. 'time_line_ids': [(0, 0, {'name': 'Call Time 1',
  22. 'time': 10.0}),
  23. (0, 0, {'name': 'Call Time 2',
  24. 'time': 11.0}),
  25. (0, 0, {'name': 'Call Time 3',
  26. 'time': 12.0}),
  27. (0, 0, {'name': 'Call Time 4',
  28. 'time': 13.0})]
  29. })
  30. def test_run_check_the_voicent_status(self):
  31. """To call the scheduler method."""
  32. self.backend_voicent_id._run_update_next_call()