Skip to content

Commit

Permalink
update unit test: backend-variable usage in template
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Aigner committed Nov 12, 2024
1 parent b980805 commit 42a9b2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions sigma/processing/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ def apply(
if self.match_rule_conditions(
pipeline, rule
): # apply transformation if conditions match or no condition defined
# result = self.transformation.apply(pipeline, rule, query, backend)
result = self.transformation.apply(pipeline, rule, query, backend)
return (result, True)
else: # just pass rule through
Expand Down
2 changes: 2 additions & 0 deletions tests/test_postprocessing_transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def test_query_template_transformation(dummy_pipeline: ProcessingPipeline, sigma
title = {{ rule.title }}
query = {{ query }}
state = {{ pipeline.state.test }}
backend_id = {{ backend.identifier }}
"""
)
dummy_pipeline.state["test"] = "teststate"
Expand All @@ -61,6 +62,7 @@ def test_query_template_transformation(dummy_pipeline: ProcessingPipeline, sigma
title = Test
query = field="value"
state = teststate
backend_id = dummy
"""
)

Expand Down

0 comments on commit 42a9b2d

Please sign in to comment.