Add comprehensive tests for scheduled task repository, scheduler service, and task handlers
- Implemented tests for ScheduledTaskRepository covering task creation, retrieval, filtering, and status updates. - Developed tests for SchedulerService including task creation, cancellation, user task retrieval, and maintenance jobs. - Created tests for TaskHandlerRegistry to validate task execution for various types, including credit recharge and sound playback. - Ensured proper error handling and edge cases in task execution scenarios. - Added fixtures and mocks to facilitate isolated testing of services and repositories.
This commit is contained in:
@@ -1 +1,32 @@
|
||||
"""Models package."""
|
||||
|
||||
# Import all models for SQLAlchemy metadata discovery
|
||||
from .base import BaseModel
|
||||
from .credit_action import CreditAction
|
||||
from .credit_transaction import CreditTransaction
|
||||
from .extraction import Extraction
|
||||
from .favorite import Favorite
|
||||
from .plan import Plan
|
||||
from .playlist import Playlist
|
||||
from .playlist_sound import PlaylistSound
|
||||
from .scheduled_task import ScheduledTask
|
||||
from .sound import Sound
|
||||
from .sound_played import SoundPlayed
|
||||
from .user import User
|
||||
from .user_oauth import UserOauth
|
||||
|
||||
__all__ = [
|
||||
"BaseModel",
|
||||
"CreditAction",
|
||||
"CreditTransaction",
|
||||
"Extraction",
|
||||
"Favorite",
|
||||
"Plan",
|
||||
"Playlist",
|
||||
"PlaylistSound",
|
||||
"ScheduledTask",
|
||||
"Sound",
|
||||
"SoundPlayed",
|
||||
"User",
|
||||
"UserOauth",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user