This commit is contained in:
kodi
2026-03-11 15:25:32 +01:00
parent 6a1a575383
commit d1f018a130
22 changed files with 909 additions and 49 deletions
+19
View File
@@ -11,6 +11,25 @@ from backend.app.config import get_settings
class ConfigTest(unittest.TestCase):
def test_default_root_aliases_include_storage1_and_storage2(self) -> None:
original = os.environ.get("WEBMANAGER_ROOT_ALIASES")
try:
os.environ.pop("WEBMANAGER_ROOT_ALIASES", None)
settings = get_settings()
finally:
if original is None:
os.environ.pop("WEBMANAGER_ROOT_ALIASES", None)
else:
os.environ["WEBMANAGER_ROOT_ALIASES"] = original
self.assertEqual(
settings.root_aliases,
{
"storage1": "/Volumes/8TB",
"storage2": "/Volumes/8TB_RAID1",
},
)
def test_default_task_db_path_is_backend_data_absolute(self) -> None:
original = os.environ.get("WEBMANAGER_TASK_DB_PATH")
try: