feat: Add unique constraint on sound hash and update related tests
This commit is contained in:
@@ -18,7 +18,7 @@ class TestUserOauthRepository:
|
||||
async def user_oauth_repository(
|
||||
self,
|
||||
test_session: AsyncSession,
|
||||
) -> AsyncGenerator[UserOauthRepository, None]: # type: ignore[misc]
|
||||
) -> AsyncGenerator[UserOauthRepository, None]:
|
||||
"""Create a user OAuth repository instance."""
|
||||
yield UserOauthRepository(test_session)
|
||||
|
||||
@@ -28,6 +28,7 @@ class TestUserOauthRepository:
|
||||
test_user: User,
|
||||
) -> int:
|
||||
"""Get test user ID to avoid lazy loading issues."""
|
||||
assert test_user.id is not None
|
||||
return test_user.id
|
||||
|
||||
@pytest_asyncio.fixture
|
||||
@@ -35,7 +36,7 @@ class TestUserOauthRepository:
|
||||
self,
|
||||
test_session: AsyncSession,
|
||||
test_user_id: int,
|
||||
) -> AsyncGenerator[UserOauth, None]: # type: ignore[misc]
|
||||
) -> AsyncGenerator[UserOauth, None]:
|
||||
"""Create a test OAuth record."""
|
||||
oauth_data = {
|
||||
"user_id": test_user_id,
|
||||
|
||||
Reference in New Issue
Block a user