def test_on_originate_success(self): connection = Mock(CTI) line = {'protocol': 'SCCP', 'name': 'zzzz'} self.user_service_manager._on_originate_success(connection, sentinel.exten, line) self._call_manager.answer_next_ringing_call.assert_called_once_with(connection, 'SCCP/zzzz') expected_message = CTIMessageFormatter.dial_success(sentinel.exten) connection.send_message.assert_called_once_with(expected_message)
def test_dial_success(self): expected = { 'class': 'dial_success', 'exten': sentinel.exten, } result = CTIMessageFormatter.dial_success(sentinel.exten) assert_that(result, equal_to(expected))
def test_dial_success(self): expected = { 'class': 'dial_success', 'exten': s.exten, } result = CTIMessageFormatter.dial_success(s.exten) assert_that(result, equal_to(expected))