@@ -0,0 +1,12 @@
|
||||
import asyncio
|
||||
from httpx import AsyncClient, ASGITransport
|
||||
from fastapi import FastAPI
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
async def test():
|
||||
async with AsyncClient(transport=ASGITransport(app=app), base_url='http://test') as ac:
|
||||
print('Success')
|
||||
|
||||
if __name__ == '__main__':
|
||||
asyncio.run(test())
|
||||
Reference in New Issue
Block a user