Skip to content

Commit 43af8d7

Browse files
committed
Python: Fix test to use async with
It doesn't work if just using plain `with`
1 parent 79039dc commit 43af8d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/ql/test/library-tests/frameworks/aiohttp/client_request.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ async def test():
66
resp = await s.request("method", "url") # $ clientRequestUrlPart="url"
77
resp = await s.request("method", url="url") # $ clientRequestUrlPart="url"
88

9-
with aiohttp.ClientSession() as session:
10-
resp = await session.get("url") # $ clientRequestUrlPart="url"
11-
resp = await session.request(method="GET", url="url") # $ clientRequestUrlPart="url"
9+
async with aiohttp.ClientSession() as session:
10+
resp = await session.get("url") # $ MISSING: clientRequestUrlPart="url"
11+
resp = await session.request(method="GET", url="url") # $ MISSING: clientRequestUrlPart="url"
1212

1313
# other methods than GET
1414
s = aiohttp.ClientSession()

0 commit comments

Comments
 (0)