Skip to content

Commit

Permalink
fix test for 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
derlih committed Oct 25, 2021
1 parent b3198bb commit 7dc0bce
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_client_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,9 @@ async def test_request_uses_base_url_when_url_is_str() -> None:
with contextlib.suppress(Exception):
await session.get("/test")

assert request_class.call_args.args[1] == URL("http://example.com/test")
args, _ = request_class.call_args
url = args[1]
assert url == URL("http://example.com/test")


async def test_request_not_uses_base_url_when_url_is_URL() -> None:
Expand All @@ -744,4 +746,6 @@ async def test_request_not_uses_base_url_when_url_is_URL() -> None:
with contextlib.suppress(Exception):
await session.get(URL("http://sample.com"))

assert request_class.call_args.args[1] == URL("http://sample.com")
args, _ = request_class.call_args
url = args[1]
assert url == URL("http://sample.com")

0 comments on commit 7dc0bce

Please sign in to comment.