fix: Lint fixes of core and repositories tests
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""Tests for extraction repository."""
|
||||
# ruff: noqa: ANN001, ANN201
|
||||
|
||||
from unittest.mock import AsyncMock, Mock
|
||||
|
||||
@@ -8,6 +9,9 @@ from sqlmodel.ext.asyncio.session import AsyncSession
|
||||
from app.models.extraction import Extraction
|
||||
from app.repositories.extraction import ExtractionRepository
|
||||
|
||||
# Constants
|
||||
TEST_SOUND_ID = 42
|
||||
|
||||
|
||||
class TestExtractionRepository:
|
||||
"""Test extraction repository."""
|
||||
@@ -123,6 +127,6 @@ class TestExtractionRepository:
|
||||
result = await extraction_repo.update(extraction, update_data)
|
||||
|
||||
assert result.status == "completed"
|
||||
assert result.sound_id == 42
|
||||
assert result.sound_id == TEST_SOUND_ID
|
||||
extraction_repo.session.commit.assert_called_once()
|
||||
extraction_repo.session.refresh.assert_called_once_with(extraction)
|
||||
|
||||
Reference in New Issue
Block a user