Add comprehensive tests for player API endpoints and player service functionality
- Implemented tests for player API endpoints including play, pause, stop, next, previous, seek, set volume, set mode, reload playlist, and get state. - Added mock player service for testing API interactions. - Created tests for player service methods including play, pause, stop playback, next, previous, seek, set volume, set mode, and reload playlist. - Ensured proper handling of success, error, and edge cases in both API and service tests. - Verified state management and serialization in player state tests.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
from app.api.v1 import auth, main, playlists, socket, sounds
|
||||
from app.api.v1 import auth, main, player, playlists, socket, sounds
|
||||
|
||||
# V1 API router with v1 prefix
|
||||
api_router = APIRouter(prefix="/v1")
|
||||
@@ -10,6 +10,7 @@ api_router = APIRouter(prefix="/v1")
|
||||
# Include all route modules
|
||||
api_router.include_router(auth.router, tags=["authentication"])
|
||||
api_router.include_router(main.router, tags=["main"])
|
||||
api_router.include_router(player.router, tags=["player"])
|
||||
api_router.include_router(playlists.router, tags=["playlists"])
|
||||
api_router.include_router(socket.router, tags=["socket"])
|
||||
api_router.include_router(sounds.router, tags=["sounds"])
|
||||
|
||||
Reference in New Issue
Block a user