We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9143f34 commit c6272a0Copy full SHA for c6272a0
tests/test_oauth2.py
@@ -0,0 +1,14 @@
1
+import pytest
2
+from httpx import AsyncClient
3
+
4
5
+@pytest.mark.anyio
6
+async def test_oauth2_basic_flow(get_app):
7
+ async with AsyncClient(app=get_app(), base_url="http://test") as client:
8
+ response = await client.get("/user")
9
+ assert response.status_code == 403
10
+ response = await client.get("/oauth2/test/auth")
11
+ response = await client.get(response.headers.get("location"))
12
+ await client.get(response.headers.get("location"))
13
14
+ assert response.status_code == 200
0 commit comments