🐛 Fixed some tests
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
import os
|
||||
from shutil import copyfileobj
|
||||
from typing import BinaryIO, Generator
|
||||
|
||||
import aiofiles
|
||||
@@ -29,8 +30,8 @@ class LocalStorage:
|
||||
|
||||
# skipcq: PYL-W0613
|
||||
async def upload(self, file_name: str, file: BinaryIO, mime_type: str | None = None) -> None:
|
||||
async with aiofiles.open(file=os.path.join(self.base_path, file_name), mode="wb") as f:
|
||||
await aioshutil_copyfileobj(file, f)
|
||||
with open(file=os.path.join(self.base_path, file_name), mode="wb") as f:
|
||||
copyfileobj(file, f)
|
||||
|
||||
async def delete(self, file_names: [str]) -> None:
|
||||
for i in file_names:
|
||||
|
||||
Reference in New Issue
Block a user