使用 yarl.URL 拼接 outer_url (#496)

*  显式依赖 yarl

*  使用 yarl.URL 处理 outer_url
This commit is contained in:
Azide
2024-03-19 10:26:38 +08:00
committed by GitHub
parent 43a3c819a4
commit a42a65523e
5 changed files with 142 additions and 136 deletions
+2 -2
View File
@@ -28,12 +28,12 @@ async def test_command(app: App):
to_me=True,
)
ctx.receive_event(bot, event_1)
ctx.should_call_send(event_1, f"请访问: {plugin_config.outer_url}auth/test_token", True)
ctx.should_call_send(event_1, f"请访问: {plugin_config.outer_url / 'auth' / 'test_token'}", True)
ctx.should_finished()
event_2 = fake_private_message_event(message=Message("管理后台"), sender=fake_admin_user, to_me=True)
ctx.receive_event(bot, event_2)
ctx.should_call_send(event_2, f"请访问: {plugin_config.outer_url}auth/test_token", True)
ctx.should_call_send(event_2, f"请访问: {plugin_config.outer_url / 'auth' / 'test_token'}", True)
ctx.should_finished()