First commit with entire first rendition of the project
This commit is contained in:
15
tests/test_mqtt.py
Normal file
15
tests/test_mqtt.py
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
Reference in New Issue
Block a user