From 589c500057e77954b58d83106e1805b76e424a62 Mon Sep 17 00:00:00 2001 From: Jair Henrique Date: Sat, 28 Dec 2024 13:39:14 -0300 Subject: [PATCH] Fix aiohttp tests --- tests/integration/test_aiohttp.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/integration/test_aiohttp.py b/tests/integration/test_aiohttp.py index 97a489b8..c1ae7484 100644 --- a/tests/integration/test_aiohttp.py +++ b/tests/integration/test_aiohttp.py @@ -4,6 +4,7 @@ import pytest import pytest_httpbin.certs +import yarl import vcr @@ -403,7 +404,7 @@ async def run(loop): async with aiohttp.ClientSession(loop=loop, cookie_jar=aiohttp.CookieJar(unsafe=True)) as session: cookies_resp = await session.get(cookies_url, ssl=HTTPBIN_SSL_CONTEXT) assert not cookies_resp.cookies - cookies = session.cookie_jar.filter_cookies(cookies_url) + cookies = session.cookie_jar.filter_cookies(yarl.URL(cookies_url)) assert cookies["Cookie_1"].value == "Val_1" assert cassette.play_count == 0 @@ -414,7 +415,7 @@ async def run(loop): async with aiohttp.ClientSession(loop=loop, cookie_jar=aiohttp.CookieJar(unsafe=True)) as session: cookies_resp = await session.get(cookies_url, ssl=HTTPBIN_SSL_CONTEXT) assert not cookies_resp.cookies - cookies = session.cookie_jar.filter_cookies(cookies_url) + cookies = session.cookie_jar.filter_cookies(yarl.URL(cookies_url)) assert cookies["Cookie_1"].value == "Val_1" assert cassette.play_count == 2 @@ -428,7 +429,7 @@ async def run(loop): async with aiohttp.ClientSession(loop=loop, cookie_jar=aiohttp.CookieJar(unsafe=True)) as session: cookies_resp = await session.get(cookies_url, ssl=HTTPBIN_SSL_CONTEXT) assert not cookies_resp.cookies - cookies = session.cookie_jar.filter_cookies(cookies_url) + cookies = session.cookie_jar.filter_cookies(yarl.URL(cookies_url)) assert cookies["Cookie_1"].value == "Val_1" run_in_loop(run)