11from datetime import datetime , timezone
2+
23import pytest
34from groundlight .edge import (
45 DEFAULT ,
@@ -177,22 +178,19 @@ def test_detectors_config_to_payload_shape():
177178
178179def test_edge_endpoint_config_accepts_top_level_payload_shape ():
179180 """Accepts the top-level edge endpoint payload shape used by APIs."""
180- config = EdgeEndpointConfig .model_validate (
181- {
182- "global_config" : {"refresh_rate" : CUSTOM_REFRESH_RATE },
183- "edge_inference_configs" : {"default" : {"enabled" : True }},
184- "detectors" : [{"detector_id" : "det_1" , "edge_inference_config" : "default" }],
185- }
186- )
181+ config = EdgeEndpointConfig .model_validate ({
182+ "global_config" : {"refresh_rate" : CUSTOM_REFRESH_RATE },
183+ "edge_inference_configs" : {"default" : {"enabled" : True }},
184+ "detectors" : [{"detector_id" : "det_1" , "edge_inference_config" : "default" }],
185+ })
187186
188187 assert config .global_config .refresh_rate == CUSTOM_REFRESH_RATE
189188 assert [detector .detector_id for detector in config .detectors ] == ["det_1" ]
190189
191190
192191def test_edge_endpoint_config_from_yaml_accepts_yaml_text ():
193192 """Parses edge-endpoint YAML text using EdgeEndpointConfig.from_yaml."""
194- config = EdgeEndpointConfig .from_yaml (
195- yaml_str = """
193+ config = EdgeEndpointConfig .from_yaml (yaml_str = """
196194 global_config:
197195 refresh_rate: 15.0
198196 edge_inference_configs:
@@ -201,8 +199,7 @@ def test_edge_endpoint_config_from_yaml_accepts_yaml_text():
201199 detectors:
202200 - detector_id: det_1
203201 edge_inference_config: default
204- """
205- )
202+ """ )
206203
207204 assert config .global_config .refresh_rate == 15.0
208205 assert [detector .detector_id for detector in config .detectors ] == ["det_1" ]
0 commit comments