Update test_char_vitals_sent_on_rest_complete to expect both Status and Vitals

This commit is contained in:
Jared Miller 2026-02-11 23:01:10 -05:00
parent 6ed71873b5
commit ca282851e3
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C

View file

@ -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