Skip to content

Commit

Permalink
Fix chat
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaSat committed Jun 26, 2024
1 parent 326a2f1 commit 5c08dd3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_trade_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5c08dd3

Please sign in to comment.