test(deezer): add unit tests for geoblocking, encrypted fallback, and metadata methods#1002
Open
berettavexee wants to merge 1 commit into
Open
test(deezer): add unit tests for geoblocking, encrypted fallback, and metadata methods#1002berettavexee wants to merge 1 commit into
berettavexee wants to merge 1 commit into
Conversation
… metadata methods Adds 9 new unit tests to the existing Deezer test suite: - WrongGeolocation with FALLBACK ID: verifies the recursive retry path - WrongGeolocation without FALLBACK: verifies NonStreamableError is raised - get_track_url returning None: verifies fallback to _get_encrypted_file_url - get_track: happy path with embedded album metadata - get_playlist: normalized response with tracks and track_total - get_metadata dispatch: routes to the correct handler by media type - get_metadata invalid type: raises for unsupported media types - search: returns results list; returns empty list when total is 0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds 9 new unit tests to the existing Deezer test suite, covering paths that were previously untested.
get_downloadableWrongGeolocationwith aFALLBACKID: verifies the recursive retry path resolves correctlyWrongGeolocationwithout aFALLBACKID: verifiesNonStreamableErroris raisedget_track_urlreturningNone: verifies fallback to_get_encrypted_file_urlMetadata methods
get_track: happy path — track dict returned with full album metadata embeddedget_playlist: normalized response containstitle,tracks, andtrack_totalget_metadatadispatch: routes to the correct handler bymedia_typeget_metadatainvalid type: raises for unsupported media typessearch: returns a one-element list wrapping the API response when results existsearch: returns an empty list whentotalis 0All tests are purely unit tests using the existing
mock_deezer_clientfixture (no ARL required).Test plan
pytest tests/test_deezer.pypasses with no ARL (13 passed, 1 skipped)🤖 Generated with Claude Code