fix(monitor): isolate offline tests and preserve localized field icons

This commit is contained in:
martino
2026-10-26 00:35:37 +01:00
parent 1ff63fa955
commit 6c2e268c4b
16 changed files with 306 additions and 64 deletions
@@ -2,12 +2,19 @@ import sys
from pathlib import Path
import subprocess
import unittest
import tempfile
from unittest.mock import MagicMock, patch
from health_fixture_modules import load_health_modules
SCRIPTS = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(SCRIPTS))
import health_monitor
import notification_events
def setUpModule():
global health_monitor, notification_events
temporary = tempfile.TemporaryDirectory(prefix='benign-notices-')
unittest.addModuleCleanup(temporary.cleanup)
health_monitor, notification_events, _ = load_health_modules(temporary.name)
NO_POWER_STATUS = ('Sep 27 09:08:50 proxmox smartd[893]: Device: /dev/sdc [SAT], '
'no ATA CHECK POWER STATUS support, ignoring -n Directive')