Refactor sound and extraction services to include user and timestamp fields
All checks were successful
Backend CI / lint (push) Successful in 18m8s
Backend CI / test (push) Successful in 53m35s

- Updated ExtractionInfo to include user_id, created_at, and updated_at fields.
- Modified ExtractionService to return user and timestamp information in extraction responses.
- Enhanced sound serialization in PlayerState to include extraction URL if available.
- Adjusted PlaylistRepository to load sound extractions when retrieving playlist sounds.
- Added tests for new fields in extraction and sound endpoints, ensuring proper response structure.
- Created new test file endpoints for sound downloads and thumbnail retrievals, including success and error cases.
- Refactored various test cases for consistency and clarity, ensuring proper mocking and assertions.
This commit is contained in:
JSC
2025-08-03 20:54:14 +02:00
parent 77446cb5a8
commit b4f0f54516
20 changed files with 780 additions and 73 deletions

View File

@@ -175,7 +175,8 @@ class TestExtractionService:
@pytest.mark.asyncio
async def test_process_extraction_with_service_detection(
self, extraction_service,
self,
extraction_service,
) -> None:
"""Test extraction processing with service detection."""
extraction_id = 1
@@ -314,6 +315,7 @@ class TestExtractionService:
result = await extraction_service._create_sound_record(
audio_path,
None, # thumbnail_path
extraction.title,
extraction.service,
extraction.service_id,