test: add test_lastfm.py (50 cases)

Covers API helpers (_get_similar_artists, _get_top_tags,
_get_similar_tracks, _search_track), config resolution, metadata
extraction from track titles, match score formatting, and both
commands (!similar, !tags) including play mode delegation, fallback
from track to artist similarity, and current-track integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
user
2026-02-22 19:52:16 +01:00
parent cd4124e07a
commit c41035ceca
2 changed files with 524 additions and 1 deletions

View File

@@ -34,7 +34,7 @@
| P0 | [x] | `!similar play` -- queue a similar track via YouTube search |
| P1 | [x] | `!tags` command -- show genre/style tags for current or named track |
| P1 | [x] | Config: `[lastfm] api_key` or `LASTFM_API_KEY` env var |
| P2 | [ ] | Tests: `test_lastfm.py` (API response mocking, command dispatch) |
| P2 | [x] | Tests: `test_lastfm.py` (50 cases: API helpers, metadata, commands) |
| P2 | [ ] | Documentation update (USAGE.md, CHEATSHEET.md) |
## Previous Sprint -- v2.3.0 Mumble Voice + Multi-Bot (2026-02-22)