update the async client

This commit is contained in:
nguu0123 2024-12-12 21:12:46 +02:00
parent e44b04b039
commit d129151a13
No known key found for this signature in database
GPG Key ID: 6AE7349D14811E55
2 changed files with 2 additions and 2 deletions

View File

@ -1080,7 +1080,7 @@ class AsyncClient(BaseClient):
async def delete(self, model: str) -> StatusResponse:
r = await self._request_raw(
'DELETE',
'POST',
'/api/delete',
json=DeleteRequest(
model=model,

View File

@ -1179,7 +1179,7 @@ async def test_async_client_create_blob_exists(httpserver: HTTPServer):
@pytest.mark.asyncio
async def test_async_client_delete(httpserver: HTTPServer):
httpserver.expect_ordered_request(PrefixPattern('/api/delete'), method='DELETE').respond_with_response(Response(status=200))
httpserver.expect_ordered_request(PrefixPattern('/api/delete'), method='POST').respond_with_response(Response(status=200))
client = AsyncClient(httpserver.url_for('/api/delete'))
response = await client.delete('dummy')
assert response['status'] == 'success'