test: update TraceAppConfigApi tests to pass app_model after tenant-scoping

The tenant-scoping change replaced the (self, app_id) signature with
(self, app_model) via @get_app_model. Match the pattern used by other
tests in this file (MagicMock(id="app-1")).
This commit is contained in:
xr843 2026-05-09 12:37:09 +08:00
parent 16b98ea4da
commit 7d9e1244a7

View File

@ -289,7 +289,7 @@ class TestOpsTraceEndpoints:
)
with app.test_request_context("/?tracing_provider=langfuse"):
result = method(app_id="app-1")
result = method(app_model=MagicMock(id="app-1"))
assert result == {"has_not_configured": True}
@ -308,7 +308,7 @@ class TestOpsTraceEndpoints:
json={"tracing_provider": "langfuse", "tracing_config": {"api_key": "k"}},
):
with pytest.raises(BadRequest):
method(app_id="app-1")
method(app_model=MagicMock(id="app-1"))
def test_trace_app_config_delete_not_found(self, app: Flask, monkeypatch: pytest.MonkeyPatch):
api = ops_trace_module.TraceAppConfigApi()
@ -322,7 +322,7 @@ class TestOpsTraceEndpoints:
with app.test_request_context("/?tracing_provider=langfuse"):
with pytest.raises(BadRequest):
method(app_id="app-1")
method(app_model=MagicMock(id="app-1"))
class TestSiteEndpoints: