@@ -223,11 +223,11 @@ async def test_client_listen_unsubscribe_before_ack_or_nack(
223223async def test_client_listen_ack_nack_sent (
224224 monkeypatch : pytest .MonkeyPatch , faker : faker .Faker , ack : AckMode , * , ok : bool
225225) -> None :
226- subscription_id , destination , message_id = faker .pystr (), faker .pystr (), faker .pystr ()
226+ subscription_id , destination , ack_id = faker .pystr (), faker .pystr (), faker .pystr ()
227227 monkeypatch .setattr (stompman .subscription , "_make_subscription_id" , mock .Mock (return_value = subscription_id ))
228228
229229 message_frame = build_dataclass (
230- MessageFrame , headers = {"destination" : destination , "message-id " : message_id , "subscription" : subscription_id }
230+ MessageFrame , headers = {"destination" : destination , "ack " : ack_id , "subscription" : subscription_id }
231231 )
232232 connection_class , collected_frames = create_spying_connection (* get_read_frames_with_lifespan ([message_frame ]))
233233 message_handler = mock .AsyncMock (side_effect = None if ok else SomeError )
@@ -244,9 +244,9 @@ async def test_client_listen_ack_nack_sent(
244244 assert collected_frames == enrich_expected_frames (
245245 SubscribeFrame (headers = {"id" : subscription_id , "destination" : destination , "ack" : ack }),
246246 message_frame ,
247- AckFrame (headers = {"id" : message_id , "subscription" : subscription_id })
247+ AckFrame (headers = {"id" : ack_id , "subscription" : subscription_id })
248248 if ok
249- else NackFrame (headers = {"id" : message_id , "subscription" : subscription_id }),
249+ else NackFrame (headers = {"id" : ack_id , "subscription" : subscription_id }),
250250 UnsubscribeFrame (headers = {"id" : subscription_id }),
251251 )
252252
0 commit comments