Closed
Description
Hi,
This is an exceptional solution provided for async deployment and model serving.
I wanted to enquire if there are examples of unit tests for this. I have been continuously struggling with unit tests for sanic async post method with the following error:
async with self.queue_lock:
AttributeError: __aenter__
I am getting this error for the line:
58 async with self.queue_lock:
59 if len(self.queue) >= MAX_QUEUE_SIZE:
The test I am trying:
import json
import pytest
from ..app import app
@pytest.mark.asyncio
async def test_basic_post():
_, response = await app.asgi_client.post("/predict", data=json.dumps(INPUT), headers=HEADERS)
print(response)
Please do let me know if anyone has come across this and have a solution.
Metadata
Metadata
Assignees
Labels
No labels