Files
spectra/tests/test_mqtt.py

16 lines
397 B
Python

from spectra.mqtt import _lookup_image_path, _db_path
class TestDbPath:
def test_db_path_ends_web_db(self):
path = _db_path()
assert path.endswith("web.db")
class TestLookupImagePath:
def test_nonexistent_id_returns_none(self):
assert _lookup_image_path(99999) is None
def test_negative_id_returns_none(self):
assert _lookup_image_path(-1) is None