notify_buy -> notify_enter, notify_sell -> notify_exit

This commit is contained in:
Sam Germain
2021-09-08 00:45:55 -06:00
parent 763a6af224
commit 8f38d6276f
3 changed files with 19 additions and 19 deletions

View File

@@ -2524,7 +2524,7 @@ def test_handle_cancel_buy(mocker, caplog, default_conf, limit_buy_order) -> Non
mocker.patch('freqtrade.exchange.Exchange.cancel_order_with_result', cancel_order_mock)
freqtrade = FreqtradeBot(default_conf)
freqtrade._notify_buy_cancel = MagicMock()
freqtrade._notify_enter_cancel = MagicMock()
trade = MagicMock()
trade.pair = 'LTC/USDT'
@@ -2566,7 +2566,7 @@ def test_handle_cancel_buy_exchanges(mocker, caplog, default_conf,
cancel_order_mock = mocker.patch(
'freqtrade.exchange.Exchange.cancel_order_with_result',
return_value=limit_buy_order_canceled_empty)
nofiy_mock = mocker.patch('freqtrade.freqtradebot.FreqtradeBot._notify_buy_cancel')
nofiy_mock = mocker.patch('freqtrade.freqtradebot.FreqtradeBot._notify_enter_cancel')
freqtrade = FreqtradeBot(default_conf)
reason = CANCEL_REASON['TIMEOUT']
@@ -2596,7 +2596,7 @@ def test_handle_cancel_buy_corder_empty(mocker, default_conf, limit_buy_order,
)
freqtrade = FreqtradeBot(default_conf)
freqtrade._notify_buy_cancel = MagicMock()
freqtrade._notify_enter_cancel = MagicMock()
trade = MagicMock()
trade.pair = 'LTC/USDT'

View File

@@ -70,7 +70,7 @@ def test_may_execute_exit_stoploss_on_exchange_multi(default_conf, ticker, fee,
mocker.patch.multiple(
'freqtrade.freqtradebot.FreqtradeBot',
create_stoploss_order=MagicMock(return_value=True),
_notify_sell=MagicMock(),
_notify_exit=MagicMock(),
)
mocker.patch("freqtrade.strategy.interface.IStrategy.should_exit", should_sell_mock)
wallets_mock = mocker.patch("freqtrade.wallets.Wallets.update", MagicMock())
@@ -154,7 +154,7 @@ def test_forcebuy_last_unlimited(default_conf, ticker, fee, limit_buy_order, moc
mocker.patch.multiple(
'freqtrade.freqtradebot.FreqtradeBot',
create_stoploss_order=MagicMock(return_value=True),
_notify_sell=MagicMock(),
_notify_exit=MagicMock(),
)
should_sell_mock = MagicMock(side_effect=[
SellCheckTuple(sell_type=SellType.NONE),