@@ -29,9 +29,9 @@ def _form(request: httpx.Request) -> dict[str, list[str]]:
2929
3030def _device_code_response (** overrides ) -> httpx .Response :
3131 payload = {"device_code" : "dc" , "user_code" : "WXYZ-9876" ,
32- "verification_uri" : "https://chat .qwen.ai/device" ,
32+ "verification_uri" : "https://auth .qwen.ai/device" ,
3333 "verification_uri_complete" :
34- "https://chat .qwen.ai/device?user_code=WXYZ-9876" ,
34+ "https://auth .qwen.ai/device?user_code=WXYZ-9876" ,
3535 "expires_in" : 600 , "interval" : 5 }
3636 payload .update (overrides )
3737 return httpx .Response (200 , json = payload )
@@ -48,7 +48,7 @@ def handler(request: httpx.Request) -> httpx.Response:
4848 session = await oauth .start ("admin" )
4949 assert session .flow is AuthFlow .POLL
5050 assert session .auth_url == (
51- "https://chat .qwen.ai/authorize?user_code=WXYZ-9876&client=cli" )
51+ "https://auth .qwen.ai/authorize?user_code=WXYZ-9876&client=cli" )
5252 assert session .user_code == "WXYZ-9876"
5353 assert session .interval == 5
5454 assert session .state != "dc"
@@ -67,7 +67,7 @@ def handler(request: httpx.Request) -> httpx.Response:
6767
6868 session = await _oauth (handler ).start ("admin" )
6969 assert session .auth_url == (
70- "https://chat .qwen.ai/authorize?user_code=WXYZ-9876&client=cli" )
70+ "https://auth .qwen.ai/authorize?user_code=WXYZ-9876&client=cli" )
7171
7272
7373async def test_start_reuses_pending_so_displayed_code_stays_pollable ():
@@ -109,7 +109,7 @@ async def test_start_defaults_interval_when_absent_or_invalid():
109109 for interval in (None , "5" , True , - 1 ):
110110 def handler (request : httpx .Request , interval = interval ) -> httpx .Response :
111111 body = {"device_code" : "dc" , "user_code" : "U" ,
112- "verification_uri" : "https://chat .qwen.ai/device" }
112+ "verification_uri" : "https://auth .qwen.ai/device" }
113113 if interval is not None :
114114 body ["interval" ] = interval
115115 return httpx .Response (200 , json = body )
0 commit comments