fix(awooop): route runs list before dynamic run lookup
This commit is contained in:
15
apps/api/tests/test_platform_router_order.py
Normal file
15
apps/api/tests/test_platform_router_order.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from src.api.v1.platform import router
|
||||
|
||||
|
||||
def test_runs_list_route_is_registered_before_dynamic_run_id() -> None:
|
||||
paths = [
|
||||
route.path
|
||||
for route in router.routes
|
||||
if "GET" in getattr(route, "methods", set())
|
||||
]
|
||||
|
||||
assert "/runs/list" in paths
|
||||
assert "/runs/{run_id}" in paths
|
||||
assert paths.index("/runs/list") < paths.index("/runs/{run_id}")
|
||||
Reference in New Issue
Block a user