@@ -184,9 +184,7 @@ def app_with_real_routes(self):
184184
185185 return app
186186
187- def test_x_orb_scheduler_header_present_in_request_reaches_server (
188- self , app_with_real_routes
189- ):
187+ def test_x_orb_scheduler_header_present_in_request_reaches_server (self , app_with_real_routes ):
190188 """A request with X-ORB-Scheduler header is accepted (not rejected by middleware)."""
191189 from fastapi .testclient import TestClient
192190
@@ -206,18 +204,11 @@ def test_routes_use_get_response_formatting_service_not_get_request_formatter(se
206204 """
207205 import ast
208206
209- routers_dir = (
210- Path (__file__ ).parent .parent .parent
211- / "src" / "orb" / "api" / "routers"
212- )
207+ routers_dir = Path (__file__ ).parent .parent .parent / "src" / "orb" / "api" / "routers"
213208 for router_file in routers_dir .glob ("*.py" ):
214209 source = router_file .read_text ()
215210 tree = ast .parse (source )
216- names_used = {
217- node .id
218- for node in ast .walk (tree )
219- if isinstance (node , ast .Name )
220- }
211+ names_used = {node .id for node in ast .walk (tree ) if isinstance (node , ast .Name )}
221212 # Current state: routers use get_response_formatting_service
222213 if "get_response_formatting_service" in source :
223214 assert "get_response_formatting_service" in names_used , (
@@ -249,7 +240,9 @@ def test_format_request_operation_uses_injected_scheduler(self):
249240 scheduler = _make_mock_scheduler ("hf" )
250241 svc = ResponseFormattingService (scheduler )
251242
252- result = svc .format_request_operation ({"request_id" : "req-1" , "status" : "pending" }, "pending" )
243+ result = svc .format_request_operation (
244+ {"request_id" : "req-1" , "status" : "pending" }, "pending"
245+ )
253246
254247 scheduler .format_request_response .assert_called_once ()
255248 assert result .data .get ("scheduler" ) == "hf"
0 commit comments