diff --git a/tests/test_trade_pipeline.py b/tests/test_trade_pipeline.py index 241eb36d6..06e24b8d1 100644 --- a/tests/test_trade_pipeline.py +++ b/tests/test_trade_pipeline.py @@ -440,6 +440,8 @@ def test_make_and_take_order(self): self.assertFalse(data["taker_locked"]) self.assertFalse(data["escrow_locked"]) + trade.finalize_contract() + maker_headers = trade.get_robot_auth(trade.maker_index) response = self.client.get(reverse("notifications"), **maker_headers) self.assertResponse(response) diff --git a/tests/utils/trade.py b/tests/utils/trade.py index 05308902e..ba838bbd8 100644 --- a/tests/utils/trade.py +++ b/tests/utils/trade.py @@ -120,6 +120,9 @@ def cancel_order(self, robot_index=1): self.response = self.client.post(path + params, body, **headers) @patch("api.tasks.send_notification.delay", send_notification) + def finalize_contract(self): + send_notification.delay(order_id=self.order_id, message="order_taken_confirmed") + def send_chat_message(self, message, robot_index=1): path = reverse("chat") headers = self.get_robot_auth(robot_index)