Prometheus exporter for HomeHub 4000 router

This commit is contained in:
Isaac Mallampati
2026-01-05 20:47:00 -05:00
commit cf3a73d38c
24 changed files with 2933 additions and 0 deletions

16
tests/conftest.py Normal file
View File

@@ -0,0 +1,16 @@
import tempfile
from pathlib import Path
import pytest
from database import VirginMonitorDatabase
@pytest.fixture
def temp_db():
"""Create a temporary database for testing."""
with tempfile.NamedTemporaryFile(suffix=".db", delete=False) as f:
db_path = f.name
db = VirginMonitorDatabase(db_path)
yield db
Path(db_path).unlink(missing_ok=True)