fix timeframe compare error

This commit is contained in:
frack113
2021-09-21 22:54:45 +02:00
parent db9e6124e3
commit e16e9e8ea7
+5 -1
View File
@@ -181,13 +181,17 @@ class TestRules(unittest.TestCase):
return False
for named_condition in detection1:
#don't check timeframes
if named_condition == "timeframe":
continue
# condition clause must be the same too
if named_condition == "condition":
if detection1["condition"] != detection2["condition"]:
return False
else:
continue
# Named condition must exist in both rule files
if named_condition not in detection2:
return False