From 2a22471de9627eb45ff9486d7c2fb3a06a050757 Mon Sep 17 00:00:00 2001 From: vikynoah Date: Mon, 9 Dec 2024 16:28:44 +0100 Subject: [PATCH] fix: httpx fix as per latest version (#25) --- creyPY/fastapi/testing_async.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/creyPY/fastapi/testing_async.py b/creyPY/fastapi/testing_async.py index 91c835e..538ae31 100644 --- a/creyPY/fastapi/testing_async.py +++ b/creyPY/fastapi/testing_async.py @@ -1,10 +1,10 @@ import json -from httpx import AsyncClient +from httpx import AsyncClient, ASGITransport class AsyncGenericClient: def __init__(self, app): - self.c = AsyncClient(app=app, base_url="http://testserver", follow_redirects=True) + self.c = AsyncClient(transport=ASGITransport(app=app), base_url="http://testserver", follow_redirects=True) self.default_headers = {} async def get(self, url: str, r_code: int = 200, parse_json=True):