Skip to content

Commit

Permalink
Update test_validators_condition.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nasbench committed Aug 9, 2024
1 parent ca0252c commit 0bcd476
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_validators_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ def test_validator_dangling_condition():
logsource:
category: test
detection:
referenced1:
selection:
field1: val1
referenced2:
filter_main_1:
field1: val1
filter_main_optional_1:
field2: val2
referenced3:
field3: val3
condition: (referenced1 or referenced2) and referenced3 and referenced4
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
"""
)
assert validator.validate(rule) == [DanglingConditionIssue([rule], "referenced4")]
assert validator.validate(rule) == [DanglingConditionIssue([rule], "filter_optional_*")]


def test_validator_dangling_detection():
Expand Down

0 comments on commit 0bcd476

Please sign in to comment.