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,6 +2,8 @@
mounted cluster filesystem, and only when their content has to change."""
import ast
import os
import sys
from types import SimpleNamespace
import tempfile
import unittest
from pathlib import Path
@@ -53,6 +55,11 @@ class PveNotificationWriteTests(unittest.TestCase):
self.addCleanup(tmp.cleanup)
self.pve = Path(tmp.name) / 'pve'
self.pve.mkdir()
platform = mock.patch.dict(sys.modules, {
'pbs_manager': SimpleNamespace(is_pbs_host=lambda: False),
})
platform.start()
self.addCleanup(platform.stop)
self.scope = load(self.pve)
self.kept = Path(self.scope['_PVE_BACKUP_DIR'])
self.mounted = True