Test config

This commit is contained in:
Nick Mowen 2022-06-16 06:21:04 -06:00
parent 8bb0033641
commit e7e0189264

View File

@ -303,6 +303,16 @@ class TestHttp(unittest.TestCase):
assert sub_labels assert sub_labels
assert sub_labels == [sub_label] assert sub_labels == [sub_label]
def test_config(self):
app = create_app(
FrigateConfig(**self.minimal_config).runtime_config, self.db, None, None, None
)
with app.test_client() as client:
config = client.get("/config").json
assert config
assert config["cameras"]["front_door"]
def _insert_mock_event(id: str) -> Event: def _insert_mock_event(id: str) -> Event:
"""Inserts a basic event model with a given id.""" """Inserts a basic event model with a given id."""
return Event.insert( return Event.insert(