File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -31,15 +31,16 @@ def test_fetch_stoploss_order_bitget(default_conf, mocker):
3131 api_mock .fetch_canceled_and_closed_orders .reset_mock ()
3232
3333 api_mock .fetch_canceled_and_closed_orders = MagicMock (
34- return_value = [{"id" : "1234" , "status" : "closed" , "info " : { "ordId" : " 123455"} }]
34+ return_value = [{"id" : "1234" , "status" : "closed" , "clientOrderId " : " 123455" }]
3535 )
36- mocker .patch (f"{ EXMS } .fetch_order" , MagicMock (return_value = {"id" : "123455" }))
36+ api_mock .fetch_open_orders = MagicMock (return_value = [{"id" : "50110" , "clientOrderId" : "1234" }])
37+
3738 resp = exchange .fetch_stoploss_order ("1234" , "ETH/BTC" )
38- assert api_mock .fetch_open_orders .call_count == 1
39- assert api_mock .fetch_canceled_and_closed_orders .call_count == 1
39+ assert api_mock .fetch_open_orders .call_count == 2
40+ assert api_mock .fetch_canceled_and_closed_orders .call_count == 2
4041
4142 assert resp ["id" ] == "1234"
42- assert resp ["id_stop" ] == "123455 "
43+ assert resp ["id_stop" ] == "50110 "
4344 assert resp ["type" ] == "stoploss"
4445
4546 default_conf ["dry_run" ] = True
You can’t perform that action at this time.
0 commit comments