Add tests for authentication and utilities, and update dependencies
- Created a new test package for services and added tests for AuthService. - Implemented tests for user registration, login, and token creation. - Added a new test package for utilities and included tests for password and JWT utilities. - Updated `uv.lock` to include new dependencies: bcrypt, email-validator, pyjwt, and pytest-asyncio.
This commit is contained in:
@@ -26,6 +26,8 @@ class User(BaseModel, table=True):
|
||||
credits: int = Field(default=0, ge=0, nullable=False)
|
||||
api_token: str | None = Field(unique=True, default=None)
|
||||
api_token_expires_at: datetime | None = Field(default=None)
|
||||
refresh_token_hash: str | None = Field(default=None)
|
||||
refresh_token_expires_at: datetime | None = Field(default=None)
|
||||
|
||||
# relationships
|
||||
oauths: list["UserOauth"] = Relationship(back_populates="user")
|
||||
|
||||
Reference in New Issue
Block a user