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

Function assert_func

tests/clients/test_httpx/test_oauth2_client.py:119–123  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

117 url = "https://provider.test/token"
118
119 def assert_func(request):
120 content = request.form
121 assert content.get("code") == "v"
122 assert content.get("client_id") == "foo"
123 assert content.get("grant_type") == "authorization_code"
124
125 transport = WSGITransport(MockDispatch(default_token, assert_func=assert_func))
126 with OAuth2Client("foo", transport=transport) as client:

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected