def test_playbook_task_description_name(source_path): base_yml = PlaybookYMLFormat(source_path) base_yml.add_description() base_yml.update_playbook_task_name() assert 'description' in base_yml.yml_data['tasks']['7']['task'] assert base_yml.yml_data['tasks']['29']['task']['name'] == 'File Enrichment - Virus Total Private API' assert base_yml.yml_data['tasks']['25']['task']['description'] == 'Check if there is a SHA256 hash in context.'
def test_playbook_task_description_name(source_path): schema_path = os.path.normpath( os.path.join(__file__, "..", "..", "..", "common", "schemas", '{}.yml'.format('playbook'))) base_yml = PlaybookYMLFormat(source_path, path=schema_path) base_yml.add_description() base_yml.update_playbook_task_name() base_yml.remove_copy_and_dev_suffixes_from_subplaybook() assert 'description' in base_yml.data['tasks']['7']['task'] assert base_yml.data['tasks']['29']['task']['name'] == 'File Enrichment - Virus Total Private API' assert base_yml.data['tasks']['25']['task']['description'] == 'Check if there is a SHA256 hash in context.'