Title: testing: ship adcp.testing.make_request_context + build_asgi_app helpers · Issue #516 · adcontextprotocol/adcp-client-python · GitHub
Open Graph Title: testing: ship adcp.testing.make_request_context + build_asgi_app helpers · Issue #516 · adcontextprotocol/adcp-client-python
X Title: testing: ship adcp.testing.make_request_context + build_asgi_app helpers · Issue #516 · adcontextprotocol/adcp-client-python
Description: From the salesagent v3.12 → 4.x migration (SDK_FEEDBACK.md, items #10 and #11). Two test-DX gaps in adcp.testing/: 1. make_request_context RequestContext has 11 fields, 4 with
Open Graph Description: From the salesagent v3.12 → 4.x migration (SDK_FEEDBACK.md, items #10 and #11). Two test-DX gaps in adcp.testing/: 1. make_request_context RequestContext has 11 fields, 4 with
X Description: From the salesagent v3.12 → 4.x migration (SDK_FEEDBACK.md, items #10 and #11). Two test-DX gaps in adcp.testing/: 1. make_request_context RequestContext has 11 fields, 4 with <factory> defau...
Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/516
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"testing: ship adcp.testing.make_request_context + build_asgi_app helpers","articleBody":"From the salesagent v3.12 → 4.x migration (`SDK_FEEDBACK.md`, items #10 and #11).\n\nTwo test-DX gaps in `adcp.testing/`:\n\n## 1. `make_request_context`\n\n`RequestContext` has 11 fields, 4 with `\u003cfactory>` defaults. For unit testing through `PlatformHandler`, the only thing the handler reads is `ctx.account` and sometimes `ctx.request_id`.\n\n> Constructing a `RequestContext` for tests requires guessing which factory defaults are safe. I hit `TypeError: unexpected keyword argument 'adopter_request'` when I read a docstring that mentioned the field but it's not a constructor parameter. The test-friendly path took several tries.\n\n**Ask:** ship `adcp.testing.make_request_context(account=..., **overrides)` with sane defaults and a stable signature documented as the test seam.\n\n## 2. `build_asgi_app`\n\n`create_adcp_server_from_platform` doesn't accept `name=`, but `serve()` does.\n\n> Building the ASGI app in tests requires going through `create_adcp_server_from_platform() → create_mcp_server()` and the kwarg surface differs between the two. The current docstring on `create_mcp_server` is a great implementation reference but it's not framed as the test seam.\n\n**Ask:** first-class `adcp.testing.build_asgi_app(platform, name=...) → ASGIApp` helper that's officially the \"for tests\" way to get a running server.\n\n## Acceptance\n\nAdopters writing platform-handler unit tests can:\n1. Construct a `RequestContext` in one line with no factory-default guessing.\n2. Get an ASGIApp from a platform in one call with the same kwarg surface as `serve()`.\n\nBoth helpers live in `adcp.testing/` (module already exists with `test_helpers.py`).","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-05-04T01:02:45Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/516"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d253a851-f3f6-34dc-f838-b27df0eb23e1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C2D0:76F02:D3AEBF:1110A83:6B00F669 |
| html-safe-nonce | 5e7098076ffe373195ff8ee7b717d4c4d7cd269864347f5661b43251c2a773e2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkQwOjc2RjAyOkQzQUVCRjoxMTEwQTgzOjZCMDBGNjY5IiwidmlzaXRvcl9pZCI6IjcwMjk1NDcyMzExMjQ0NTI5NjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | af36de727795615d054cd2fa8a30e3779f26a08f22b7b168fd7a051a28103d61 |
| hovercard-subject-tag | issue:4373477464 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/adcontextprotocol/adcp-client-python/516/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8c22819a63bb47962122aac861bac9bb4fc3ba9ac6dcc6f4de93f11687d05941/adcontextprotocol/adcp-client-python/issues/516 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8c22819a63bb47962122aac861bac9bb4fc3ba9ac6dcc6f4de93f11687d05941/adcontextprotocol/adcp-client-python/issues/516 |
| og:image:alt | From the salesagent v3.12 → 4.x migration (SDK_FEEDBACK.md, items #10 and #11). Two test-DX gaps in adcp.testing/: 1. make_request_context RequestContext has 11 fields, 4 with |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bokelley |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git |
| octolytics-dimension-user_id | 221690821 |
| octolytics-dimension-user_login | adcontextprotocol |
| octolytics-dimension-repository_id | 1090305973 |
| octolytics-dimension-repository_nwo | adcontextprotocol/adcp-client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1090305973 |
| octolytics-dimension-repository_network_root_nwo | adcontextprotocol/adcp-client-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width