mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-10-28 20:11:18 -04:00
FE+TESTS: review fixes
This commit is contained in:
1 parent
bd4b2f14e3
commit
ce6914beaf
2 files changed
+8
-1
No files matched your search
@@ -122,6 +122,13 @@ def check_content_drift():
|
||||
if group[0] not in CONTENT_MATCH_GROUP_KEYS:
|
||||
continue
|
||||
bodies = {path: read_body(path) for path in group}
|
||||
|
||||
missing = [path for path, body in bodies.items() if body is None]
|
||||
if missing:
|
||||
for path in missing:
|
||||
problems.append(f"- {path} is missing (part of a content-match group).")
|
||||
continue
|
||||
|
||||
reference_path, reference_body = group[0], bodies[group[0]]
|
||||
for path, body in bodies.items():
|
||||
if path == reference_path:
|
||||
|
||||
@@ -264,7 +264,7 @@ def _common_patches(monkeypatch, main_mod, db, fake_pm):
|
||||
monkeypatch.setattr(main_mod, "update_api", lambda *a, **kw: None)
|
||||
monkeypatch.setattr(main_mod, "updateState", lambda *a, **kw: _FakeState())
|
||||
monkeypatch.setattr(main_mod, "DB", lambda: db)
|
||||
monkeypatch.setattr(main_mod, "process_scan", lambda db: None)
|
||||
monkeypatch.setattr(main_mod, "process_scan", lambda db, all_plugins=None: None)
|
||||
monkeypatch.setattr(main_mod, "get_setting_value", lambda key, default=None: 30 if key == "MAINT_PERF_DAYS" else default)
|
||||
monkeypatch.setattr(main_mod.conf, "last_scan_run", main_mod.timeNowUTC(as_string=False) - main_mod.datetime.timedelta(minutes=5))
|
||||
monkeypatch.setattr(main_mod.conf, "DEEP_SLEEP", False, raising=False)
|
||||
|
||||
Reference in new issue
Block a user