style: apply ruff formatting to all backend files
CI / lint-and-test (push) Failing after 38s

This commit is contained in:
2026-04-16 18:58:41 +02:00
parent b86539399b
commit 4713b43afe
14 changed files with 254 additions and 187 deletions
+14 -3
View File
@@ -33,11 +33,22 @@ def test_matches_after_hours():
def test_evaluate_event_creates_alert(monkeypatch):
from rules import alerts_collection
monkeypatch.setattr("rules.load_rules", lambda: [
{"_id": "r1", "name": "Test rule", "enabled": True, "severity": "high", "conditions": [{"field": "operation", "op": "eq", "value": "Add user"}], "message": "Alert!"}
])
monkeypatch.setattr(
"rules.load_rules",
lambda: [
{
"_id": "r1",
"name": "Test rule",
"enabled": True,
"severity": "high",
"conditions": [{"field": "operation", "op": "eq", "value": "Add user"}],
"message": "Alert!",
}
],
)
inserted = {}
def mock_insert(doc):
inserted["doc"] = doc