conftest e2e auth/test user create

This commit is contained in:
2026-08-17 19:33:23 +03:00
parent 0a4a21f2e7
commit 1eb9935a15
5 changed files with 61 additions and 21 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
import asyncio
from src.database.users.crud import UsersCrudActions
from src.errors.http_errors.errors import Errors
from src.models.pydantic_models.model import UserCreate, UserOut, UserUpdate
@@ -15,7 +17,7 @@ class CrudService:
async def _plain_to_hash(self, user_data:dict)->dict:
user_data["hashed_password"]=user_data.pop("plain_password")
user_data["hashed_password"]=self.hash_service.plain_to_hash(user_data["hashed_password"])
user_data["hashed_password"]= await asyncio.to_thread(self.hash_service.plain_to_hash, user_data["hashed_password"])
return user_data