feat(update): Firmware-Update aus dem Ordner mit Einmal-URLs und WLAN-Sicherung

This commit is contained in:
Michael Sauer
2026-09-16 16:45:24 +02:00
parent cc318c9d25
commit ccc31d3286
9 changed files with 878 additions and 10 deletions
+9
View File
@@ -4,6 +4,7 @@ from __future__ import annotations
from collections.abc import Generator
from copy import deepcopy
from pathlib import Path
from typing import Any
from unittest.mock import AsyncMock, MagicMock, patch
@@ -101,3 +102,11 @@ def mock_setup_entry() -> Generator[AsyncMock]:
"""Flow tests must not set the entry up for real."""
with patch("custom_components.ninlight.async_setup_entry", return_value=True) as mock:
yield mock
@pytest.fixture(autouse=True)
def firmware_dir(tmp_path: Path) -> Generator[Path]:
"""Every Home Assistant test gets its own, initially empty firmware folder."""
directory = tmp_path / "ninlight_firmware"
with patch("custom_components.ninlight.shared.firmware_directory", return_value=directory):
yield directory