From ca282851e37b850cb620406ea2acf788cdafc82b Mon Sep 17 00:00:00 2001 From: Jared Miller Date: Wed, 11 Feb 2026 23:01:10 -0500 Subject: [PATCH] Update test_char_vitals_sent_on_rest_complete to expect both Status and Vitals --- tests/test_gmcp.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/tests/test_gmcp.py b/tests/test_gmcp.py index a661588..413da2d 100644 --- a/tests/test_gmcp.py +++ b/tests/test_gmcp.py @@ -284,15 +284,21 @@ async def test_char_vitals_sent_on_rest_complete(player): await process_resting() - # Should have called send_gmcp with Char.Vitals - player.writer.send_gmcp.assert_called_once_with( - "Char.Vitals", - { - "pl": round(player.pl, 1), - "stamina": round(player.max_stamina, 1), - "max_stamina": round(player.max_stamina, 1), - }, - ) + # Should have called send_gmcp with both Char.Status and Char.Vitals + assert player.writer.send_gmcp.call_count == 2 + + # First call should be Char.Status + first_call = player.writer.send_gmcp.call_args_list[0] + assert first_call[0][0] == "Char.Status" + + # Second call should be Char.Vitals + second_call = player.writer.send_gmcp.call_args_list[1] + assert second_call[0][0] == "Char.Vitals" + assert second_call[0][1] == { + "pl": round(player.pl, 1), + "stamina": round(player.max_stamina, 1), + "max_stamina": round(player.max_stamina, 1), + } @pytest.mark.asyncio