mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 09:45:22 +03:00
Add tests for config error
This commit is contained in:
parent
6b2ed432ce
commit
4cb0318753
@ -1424,6 +1424,36 @@ class TestConfig(unittest.TestCase):
|
|||||||
ValidationError, lambda: frigate_config.runtime_config.cameras
|
ValidationError, lambda: frigate_config.runtime_config.cameras
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def test_fails_zone_defines_untracked_object(self):
|
||||||
|
config = {
|
||||||
|
"mqtt": {"host": "mqtt"},
|
||||||
|
"objects": {"track": ["person"]},
|
||||||
|
"cameras": {
|
||||||
|
"back": {
|
||||||
|
"ffmpeg": {
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"path": "rtsp://10.0.0.1:554/video",
|
||||||
|
"roles": ["detect"],
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"zones": {
|
||||||
|
"steps": {
|
||||||
|
"coordinates": "0,0,0,0",
|
||||||
|
"objects": ["car", "person"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
frigate_config = FrigateConfig(**config)
|
||||||
|
|
||||||
|
self.assertRaises(
|
||||||
|
ValueError, lambda: frigate_config.runtime_config.cameras
|
||||||
|
)
|
||||||
|
|
||||||
def test_object_filter_ratios_work(self):
|
def test_object_filter_ratios_work(self):
|
||||||
config = {
|
config = {
|
||||||
"mqtt": {"host": "mqtt"},
|
"mqtt": {"host": "mqtt"},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user