(request)
| 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: |