Plugin: update tests #15
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Plugin rework (see #18). Tests need to track the config and client
changes from #13/#14.
Task
In
/opt/data/git/git.sams.wtf/coop/beets-appleplaylists/tests/:test_apple_api.py: FakeSession asserting gateway URLs(
{service}/api/v1/playlists,/playlists/{id}/tracks), bearer header,401 -> AppleAPIError with the re-login hint.
test_plugin.py: new config defaults (service_url/service_token,env fallbacks); command registration unchanged.
(polling loop, status output, logout DELETE).
but check imports in the plugin fixture).
Acceptance criteria
uv run pytestgreen; coverage of the reworked paths exists; no testtouches the network or the real beets config.
Implemented in
coop/beets-appleplaylistscommitb5a121c8c728bcf218e5e4561bed603e01e82b44. Tests now use gatewayFakeSession/FakeResponsedoubles, assert the gateway URLs and bearer header, cover 401/403 and network errors, verify config defaults/env fallbacks, and cover login polling, status output, logout DELETE, and missing-config errors.Verification:
uv run pytest -q-> 21 passed; no test contacts the network or the real beets config.