예제 #1
0
def test_handler_without_next_token(mock_threatstream_connect, mock_ssm,
                                    mock_ti_config):  # pylint: disable=unused-argument
    """Threat Intel Downloader - Test handler"""
    mock_ssm.return_value = MockSSMClient(suppress_params=True,
                                          parameters=mock_ssm_response())
    handler(None, get_mock_context())
    mock_threatstream_connect.assert_not_called()
예제 #2
0
def test_handler_next_token(mock_get, mock_ssm):
    """Threat Intel Downloader - Test handler with next token passed in"""
    mock_ssm.return_value = MockSSMClient(suppress_params=True,
                                          parameters=mock_ssm_response())
    handler({'next_url': 'next_token'}, get_mock_context())
    mock_get.assert_called()