Skip to content

Commit

Permalink
✔️ test async pathlike proper convertion
Browse files Browse the repository at this point in the history
  • Loading branch information
Ousret committed Jan 1, 2025
1 parent 67520ea commit 2f89752
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,12 +966,24 @@ def test_ssl_certificate_as_pathlike(self, san_server):

s = niquests.Session()

print(ca_bundle)

r = s.get(f"https://localhost:{port}/", verify=Path(ca_bundle))

assert r.status_code == 204

s.close()

@pytest.mark.asyncio
async def test_async_ssl_certificate_as_pathlike(self, san_server):
_, port, ca_bundle = san_server

s = niquests.AsyncSession()

r = await s.get(f"https://localhost:{port}/", verify=Path(ca_bundle))

assert r.status_code == 204

await s.close()

@pytest.mark.parametrize(
"env, expected",
(
Expand Down

0 comments on commit 2f89752

Please sign in to comment.