mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-16 11:00:54 +00:00
🐛 Bug: 添加 HTTP 客户端会话上下文检查 (#2632)
This commit is contained in:
@ -328,6 +328,11 @@ async def test_http_client_session(driver: Driver, server_url: URL):
|
||||
with pytest.raises(RuntimeError):
|
||||
await session.request(request)
|
||||
|
||||
with pytest.raises(RuntimeError): # noqa: PT012
|
||||
async with session:
|
||||
async with session:
|
||||
...
|
||||
|
||||
async with session as session:
|
||||
# simple post with query, headers, cookies and content
|
||||
request = Request(
|
||||
|
Reference in New Issue
Block a user