feat: Enhance user metrics retrieval by integrating Extraction model and updating related queries
Some checks failed
Backend CI / lint (push) Failing after 17s
Backend CI / test (push) Failing after 2m32s

This commit is contained in:
JSC
2025-10-04 13:45:36 +02:00
parent 95e166eefb
commit b66b8e36bb
4 changed files with 55 additions and 41 deletions

View File

@@ -15,19 +15,32 @@ def mock_sound_repository():
@pytest.fixture
def dashboard_service(mock_sound_repository):
def mock_user_repository():
"""Mock user repository."""
return Mock()
@pytest.fixture
def dashboard_service(mock_sound_repository, mock_user_repository):
"""Dashboard service with mocked dependencies."""
return DashboardService(sound_repository=mock_sound_repository)
return DashboardService(
sound_repository=mock_sound_repository,
user_repository=mock_user_repository,
)
class TestDashboardService:
"""Test dashboard service."""
@pytest.mark.asyncio
async def test_init(self, mock_sound_repository):
async def test_init(self, mock_sound_repository, mock_user_repository):
"""Test dashboard service initialization."""
service = DashboardService(sound_repository=mock_sound_repository)
service = DashboardService(
sound_repository=mock_sound_repository,
user_repository=mock_user_repository,
)
assert service.sound_repository == mock_sound_repository
assert service.user_repository == mock_user_repository
@pytest.mark.asyncio
async def test_get_soundboard_statistics_success(