Initial commit: Shelly Manager with Textual CLI, Streamlit UI, and comprehensive .gitignore
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.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
"""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",
|
||||
)
|
||||
Reference in New Issue
Block a user