71803418e5
Shelly device management app with mDNS/subnet discovery, inventory, configuration, and mass operations for Gen1/Gen2+ devices. Includes .gitignore excluding runtime data (device DB, user config), AI conversation history, build artifacts, and common Python/OS patterns.
33 lines
643 B
Python
33 lines
643 B
Python
"""Pytest fixtures."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import tempfile
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
from shelly_manager.core.config import AppConfig
|
|
|
|
|
|
@pytest.fixture
|
|
def tmp_data_dir() -> Path:
|
|
with tempfile.TemporaryDirectory() as d:
|
|
yield Path(d)
|
|
|
|
|
|
@pytest.fixture
|
|
def app_config_sqlite(tmp_data_dir: Path) -> AppConfig:
|
|
return AppConfig(
|
|
storage_backend="sqlite",
|
|
sqlite_path=tmp_data_dir / "test.db",
|
|
)
|
|
|
|
|
|
@pytest.fixture
|
|
def app_config_markdown(tmp_data_dir: Path) -> AppConfig:
|
|
return AppConfig(
|
|
storage_backend="markdown",
|
|
markdown_dir=tmp_data_dir / "md",
|
|
)
|