Skip to content

Commit fb349de

Browse files
bokelleyclaude
andcommitted
test: address review nits — silence soft-warns, rename smoke test
- Add the four SalesPlatform-required stubs (get_media_buys, list_creative_formats, list_creatives, provide_performance_feedback) to the test fixture. Drops the 24-warning soft-warn cascade to 4. - Rename test_build_asgi_app_threads_name → ..._accepts_name_kwarg to reflect what the test actually asserts (construction succeeds; wiring is framework-internal). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent cbee762 commit fb349de

1 file changed

Lines changed: 17 additions & 5 deletions

File tree

tests/test_testing_decisioning.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,18 @@ def sync_creatives(self, req, ctx):
104104
def get_media_buy_delivery(self, req, ctx):
105105
return {"media_buy_deliveries": []}
106106

107+
def get_media_buys(self, req, ctx):
108+
return {"media_buys": []}
109+
110+
def list_creative_formats(self, req, ctx):
111+
return {"creative_formats": []}
112+
113+
def list_creatives(self, req, ctx):
114+
return {"creatives": []}
115+
116+
def provide_performance_feedback(self, req, ctx):
117+
return {"acknowledged": True}
118+
107119

108120
def test_build_asgi_app_returns_asgi_callable() -> None:
109121
"""The returned object is a callable ASGI app — can be invoked
@@ -125,13 +137,13 @@ def test_build_asgi_app_default_skips_webhook_gate() -> None:
125137
assert app is not None
126138

127139

128-
def test_build_asgi_app_threads_name() -> None:
129-
"""``name=`` reaches the underlying MCP server."""
140+
def test_build_asgi_app_accepts_name_kwarg() -> None:
141+
"""Smoke: ``name=`` is a recognized kwarg and construction
142+
succeeds. The wiring of the name to the MCP server is
143+
framework-internal and verified by the underlying
144+
``create_mcp_server`` suite."""
130145
platform = _SalesPlatformWithMethods()
131146
app = build_asgi_app(platform, name="custom-test-agent")
132-
# The Starlette app exposes the underlying FastMCP via internal
133-
# state; we don't assert the wiring path (framework-internal),
134-
# just that constructing with ``name`` doesn't raise.
135147
assert app is not None
136148

137149

0 commit comments

Comments
 (0)