fix: post_file method change for testing (#29)

* fix: post_file method change for testing

* changes
This commit is contained in:
vikynoah
2025-01-16 09:35:23 +01:00
committed by GitHub
parent 573f59349f
commit 2d6de99585
2 changed files with 3 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ class GenericClient(TestClient):
re = self.c.post( re = self.c.post(
url, url,
files={"file": file}, files={"file": file},
headers=self.default_headers | {"Content-Type": "application/json"}, headers=self.default_headers,
*args, *args,
**kwargs, **kwargs,
) )

View File

@@ -1,4 +1,5 @@
import json import json
from httpx import ASGITransport, AsyncClient from httpx import ASGITransport, AsyncClient
@@ -45,7 +46,7 @@ class AsyncGenericClient:
re = await self.c.post( re = await self.c.post(
url, url,
files={"file": file}, files={"file": file},
headers=self.default_headers | {"Content-Type": "application/json"}, headers=self.default_headers,
*args, *args,
**kwargs, **kwargs,
) )