From 5c08dd3e590c00ab8d0749a16870e24aa962e5a6 Mon Sep 17 00:00:00 2001 From: KoalaSat Date: Wed, 26 Jun 2024 22:43:16 +0200 Subject: [PATCH] Fix chat --- tests/test_trade_pipeline.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_trade_pipeline.py b/tests/test_trade_pipeline.py index fdc575cbd..5b1ab1a28 100644 --- a/tests/test_trade_pipeline.py +++ b/tests/test_trade_pipeline.py @@ -1008,10 +1008,13 @@ def test_chat(self): ) # Post new message as taker without offset, so response should not have messages. - trade.send_chat_message(message, trade.taker_index) + trade.send_chat_message(message + " 2", trade.taker_index) self.assertResponse(trade.response) self.assertEqual(trade.response.status_code, 200) - self.assertEqual(trade.response.json(), {}) # Nothing in the response + self.assertEqual(trade.response.json()["messages"][0]["message"], message) + self.assertEqual( + trade.response.json()["messages"][1]["message"], message + " 2" + ) maker_headers = trade.get_robot_auth(trade.maker_index) response = self.client.get(reverse("notifications"), **maker_headers)