From 326a2f12bd99c1589ea6a8b3c34c6b45fb708224 Mon Sep 17 00:00:00 2001 From: KoalaSat Date: Wed, 26 Jun 2024 16:09:51 +0200 Subject: [PATCH] Fix chat --- tests/test_trade_pipeline.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_trade_pipeline.py b/tests/test_trade_pipeline.py index f91152539..fdc575cbd 100644 --- a/tests/test_trade_pipeline.py +++ b/tests/test_trade_pipeline.py @@ -997,14 +997,14 @@ def test_chat(self): self.assertEqual(trade.response.json()["messages"][0]["message"], message) self.assertTrue(trade.response.json()["peer_connected"]) - maker_headers = trade.get_robot_auth(trade.maker_index) - response = self.client.get(reverse("notifications"), **maker_headers) + taker_headers = trade.get_robot_auth(trade.taker_index) + response = self.client.get(reverse("notifications"), **taker_headers) self.assertResponse(response) notifications_data = list(response.json()) self.assertEqual(notifications_data[0]["order_id"], trade.order_id) self.assertEqual( notifications_data[0]["title"], - "✅ Hey your order wit", + f"💬 Hey {taker_nick}, a new chat message in-app was sent to you by {maker_nick} for order ID {trade.order_id}.", ) # Post new message as taker without offset, so response should not have messages. @@ -1013,14 +1013,14 @@ def test_chat(self): self.assertEqual(trade.response.status_code, 200) self.assertEqual(trade.response.json(), {}) # Nothing in the response - taker_headers = trade.get_robot_auth(trade.taker_index) - response = self.client.get(reverse("notifications"), **taker_headers) + maker_headers = trade.get_robot_auth(trade.maker_index) + response = self.client.get(reverse("notifications"), **maker_headers) self.assertResponse(response) notifications_data = list(response.json()) self.assertEqual(notifications_data[0]["order_id"], trade.order_id) self.assertEqual( notifications_data[0]["title"], - "✅ Hey your order wit", + f"💬 Hey {maker_nick}, a new chat message in-app was sent to you by {taker_nick} for order ID {trade.order_id}.", ) # Get the two chatroom messages as maker