feat(update): Firmware-Update aus dem Ordner mit Einmal-URLs und WLAN-Sicherung
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user