Merge pull request #3527 from Theagainmen/Warning_message2
Warning message bot is stopped and left open trades
This commit is contained in:
@@ -4028,3 +4028,19 @@ def test_cancel_all_open_orders(mocker, default_conf, fee, limit_buy_order, limi
|
||||
freqtrade.cancel_all_open_orders()
|
||||
assert buy_mock.call_count == 1
|
||||
assert sell_mock.call_count == 1
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("init_persistence")
|
||||
def test_check_for_open_trades(mocker, default_conf, fee, limit_buy_order, limit_sell_order):
|
||||
freqtrade = get_patched_freqtradebot(mocker, default_conf)
|
||||
|
||||
freqtrade.check_for_open_trades()
|
||||
assert freqtrade.rpc.send_msg.call_count == 0
|
||||
|
||||
create_mock_trades(fee)
|
||||
trade = Trade.query.first()
|
||||
trade.is_open = True
|
||||
|
||||
freqtrade.check_for_open_trades()
|
||||
assert freqtrade.rpc.send_msg.call_count == 1
|
||||
assert 'Handle these trades manually' in freqtrade.rpc.send_msg.call_args[0][0]['status']
|
||||
|
Reference in New Issue
Block a user