@@ -223,11 +223,11 @@ async def test_client_listen_unsubscribe_before_ack_or_nack(
223
223
async def test_client_listen_ack_nack_sent (
224
224
monkeypatch : pytest .MonkeyPatch , faker : faker .Faker , ack : AckMode , * , ok : bool
225
225
) -> 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 ()
227
227
monkeypatch .setattr (stompman .subscription , "_make_subscription_id" , mock .Mock (return_value = subscription_id ))
228
228
229
229
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 }
231
231
)
232
232
connection_class , collected_frames = create_spying_connection (* get_read_frames_with_lifespan ([message_frame ]))
233
233
message_handler = mock .AsyncMock (side_effect = None if ok else SomeError )
@@ -244,9 +244,9 @@ async def test_client_listen_ack_nack_sent(
244
244
assert collected_frames == enrich_expected_frames (
245
245
SubscribeFrame (headers = {"id" : subscription_id , "destination" : destination , "ack" : ack }),
246
246
message_frame ,
247
- AckFrame (headers = {"id" : message_id , "subscription" : subscription_id })
247
+ AckFrame (headers = {"id" : ack_id , "subscription" : subscription_id })
248
248
if ok
249
- else NackFrame (headers = {"id" : message_id , "subscription" : subscription_id }),
249
+ else NackFrame (headers = {"id" : ack_id , "subscription" : subscription_id }),
250
250
UnsubscribeFrame (headers = {"id" : subscription_id }),
251
251
)
252
252
0 commit comments