def test_add_tags_to_object_success(test_object): # pylint: disable=redefined-outer-name test_object.processed_analysis['some_analysis'] = { 'tags': { 'tag': 'any_tag' } } file_object = add_tags_to_object(test_object, 'some_analysis') assert 'some_analysis' in file_object.analysis_tags assert file_object.analysis_tags['some_analysis'] == {'tag': 'any_tag'}
def _handle_analysis_tags(self, fw, plugin): self.tag_queue.put(check_tags(fw, plugin)) return add_tags_to_object(fw, plugin)
def test_add_tags_to_object_success(test_object): test_object.processed_analysis['some_analysis'] = {'tags': {'tag': 'any_tag'}} file_object = add_tags_to_object(test_object, 'some_analysis') assert 'some_analysis' in file_object.analysis_tags assert file_object.analysis_tags['some_analysis'] == {'tag': 'any_tag'}
def test_add_tags_to_object_unkown_analysis(test_object): # pylint: disable=redefined-outer-name,invalid-name file_object = add_tags_to_object(test_object, 'any_analysis') assert not file_object.analysis_tags
def test_add_tags_to_object_unkown_analysis(test_object): file_object = add_tags_to_object(test_object, 'any_analysis') assert not file_object.analysis_tags