Skip to content

Commit

Permalink
Test save playlsit name too long
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsayre committed Jan 8, 2025
1 parent 8839921 commit 44cace8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,14 @@ async def test_save_queue(player: HeosPlayer) -> None:
await player.save_queue("Test")


async def test_save_queue_too_long_raises(player: HeosPlayer) -> None:
"""Test the save_queue command."""
with pytest.raises(
ValueError, match="'name' must be less than or equal to 128 characters"
):
await player.save_queue("S" * 129)


@calls_command(
"player.move_queue_item",
{
Expand Down

0 comments on commit 44cace8

Please sign in to comment.