mirror of
https://gitlab.com/iscmt/homehub4000-prometheus-exporter.git
synced 2026-04-04 17:22:24 -04:00
Prometheus exporter for HomeHub 4000 router
This commit is contained in:
16
tests/conftest.py
Normal file
16
tests/conftest.py
Normal 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)
|
||||
Reference in New Issue
Block a user