From 52f565b647819a89a928558b90713b26ef10d238 Mon Sep 17 00:00:00 2001 From: Tomas Kracmar Date: Thu, 16 Apr 2026 19:01:24 +0200 Subject: [PATCH] style: apply ruff formatting to tests/test_rules.py --- backend/tests/test_rules.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/tests/test_rules.py b/backend/tests/test_rules.py index 57ffbae..cc5f816 100644 --- a/backend/tests/test_rules.py +++ b/backend/tests/test_rules.py @@ -5,6 +5,7 @@ def test_matches_equals(): rule = {"conditions": [{"field": "operation", "op": "eq", "value": "Add user"}]} event = {"operation": "Add user", "timestamp": datetime.now(UTC).isoformat()} from rules import _matches + assert _matches(rule, event) is True @@ -12,6 +13,7 @@ def test_matches_not_equals(): rule = {"conditions": [{"field": "operation", "op": "neq", "value": "Delete user"}]} event = {"operation": "Add user", "timestamp": datetime.now(UTC).isoformat()} from rules import _matches + assert _matches(rule, event) is True @@ -19,6 +21,7 @@ def test_matches_contains(): rule = {"conditions": [{"field": "actor_display", "op": "contains", "value": "Admin"}]} event = {"actor_display": "Admin (admin@example.com)", "timestamp": datetime.now(UTC).isoformat()} from rules import _matches + assert _matches(rule, event) is True @@ -26,6 +29,7 @@ def test_matches_after_hours(): rule = {"conditions": [{"field": "timestamp", "op": "after_hours", "value": None}]} event = {"timestamp": "2024-01-01T22:00:00Z"} from rules import _matches + assert _matches(rule, event) is True event2 = {"timestamp": "2024-01-01T10:00:00Z"}