def test_basic(self, mock_TendrilPartial, mock_get_manager, mock_cert_wrapper, mock_outgoing_endpoint): submitter.send_notification('hub', 'app', 'summary', 'body') mock_outgoing_endpoint.assert_called_once_with('hub') mock_get_manager.assert_called_once_with('tcp', 'outgoing') mock_get_manager.return_value.assert_has_calls([ mock.call.start(), mock.call.connect('hub', 'the_app', 'wrapper'), ]) mock_TendrilPartial.assert_called_once_with( submitter.SubmitterApplication, 'app', 'summary', 'body', None, None, None) mock_cert_wrapper.assert_called_once_with( None, 'submitter', secure=True)
def test_extra(self, mock_TendrilPartial, mock_get_manager, mock_cert_wrapper, mock_outgoing_endpoint): submitter.send_notification('hub', 'app', 'summary', 'body', 'urgency', 'category', 'id', 'cert_conf', False) mock_outgoing_endpoint.assert_called_once_with('hub') mock_get_manager.assert_called_once_with('tcp', 'outgoing') mock_get_manager.return_value.assert_has_calls([ mock.call.start(), mock.call.connect('hub', 'the_app', 'wrapper'), ]) mock_TendrilPartial.assert_called_once_with( submitter.SubmitterApplication, 'app', 'summary', 'body', 'urgency', 'category', 'id') mock_cert_wrapper.assert_called_once_with( 'cert_conf', 'submitter', secure=False)