def test_output_loading(): """OutputDispatcher - Loading Output Classes""" loaded_outputs = set(StreamAlertOutput.get_all_outputs()) # Add new outputs to this list to make sure they're loaded properly expected_outputs = { 'aws-firehose', 'aws-lambda', 'aws-s3', 'jira', 'pagerduty', 'pagerduty-v2', 'pagerduty-incident', 'phantom', 'slack' } assert_items_equal(loaded_outputs, expected_outputs)
def _setup_output_subparser(subparser): """Add the output subparser: manage.py output SERVICE""" outputs = sorted(StreamAlertOutput.get_all_outputs().keys()) # Output parser arguments subparser.add_argument( 'service', choices=outputs, metavar='SERVICE', help= 'Create a new StreamAlert output for one of the available services: {}' .format(', '.join(outputs)))
def test_user_defined_properties(): """OutputDispatcher - User Defined Properties""" for output in StreamAlertOutput.get_all_outputs().values(): props = output.get_user_defined_properties() # The user defined properties should at a minimum contain a descriptor assert_is_not_none(props.get('descriptor'))