Skip to content

Commit

Permalink
Set cancel_status if it's not None
Browse files Browse the repository at this point in the history
Signed-off-by: aftermath2 <[email protected]>
  • Loading branch information
aftermath2 committed Nov 12, 2024
1 parent 89ec457 commit 72c9e74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/utils/trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ def cancel_order(self, robot_index=1, cancel_status=None):
path = reverse("order")
params = f"?order_id={self.order_id}"
headers = self.get_robot_auth(robot_index)
body = {"action": "cancel", "cancel_status": cancel_status}
body = {"action": "cancel"}
if cancel_status is not None:
body.update({"cancel_status": cancel_status})
self.response = self.client.post(path + params, body, **headers)

@patch("api.tasks.send_notification.delay", send_notification)
Expand Down

0 comments on commit 72c9e74

Please sign in to comment.