MCPcopy Create free account
hub / github.com/authlib/authlib / assert_func

Function assert_func

tests/clients/test_httpx/test_async_oauth2_client.py:146–151  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

144 url = "https://provider.test/token"
145
146 async def assert_func(request):
147 content = await request.body()
148 content = content.decode()
149 assert "code=v" in content
150 assert "client_id=" in content
151 assert "grant_type=authorization_code" in content
152
153 transport = ASGITransport(AsyncMockDispatch(default_token, assert_func=assert_func))
154 async with AsyncOAuth2Client("foo", transport=transport) as client:

Callers

nothing calls this directly

Calls 2

bodyMethod · 0.80
decodeMethod · 0.80

Tested by

no test coverage detected