Merge branch 'feat/short' into lev-exchange

This commit is contained in:
Sam Germain
2021-09-12 23:41:34 -06:00
14 changed files with 68 additions and 45 deletions

View File

@@ -1673,7 +1673,7 @@ def test_enter_positions(mocker, default_conf, caplog) -> None:
MagicMock(return_value=False))
n = freqtrade.enter_positions()
assert n == 0
assert log_has('Found no buy signals for whitelisted currencies. Trying again...', caplog)
assert log_has('Found no enter signals for whitelisted currencies. Trying again...', caplog)
# create_trade should be called once for every pair in the whitelist.
assert mock_ct.call_count == len(default_conf['exchange']['pair_whitelist'])
@@ -1734,7 +1734,7 @@ def test_exit_positions_exception(mocker, default_conf, limit_buy_order, caplog)
)
n = freqtrade.exit_positions(trades)
assert n == 0
assert log_has('Unable to sell trade ETH/BTC: ', caplog)
assert log_has('Unable to exit trade ETH/BTC: ', caplog)
def test_update_trade_state(mocker, default_conf, limit_buy_order, caplog) -> None:
@@ -3366,7 +3366,7 @@ def test__safe_exit_amount_error(default_conf, fee, caplog, mocker):
)
freqtrade = FreqtradeBot(default_conf)
patch_get_signal(freqtrade)
with pytest.raises(DependencyException, match=r"Not enough amount to sell."):
with pytest.raises(DependencyException, match=r"Not enough amount to exit."):
assert freqtrade._safe_exit_amount(trade.pair, trade.amount)

View File

@@ -90,7 +90,7 @@ def test_enter_exit_side(fee):
@pytest.mark.usefixtures("init_persistence")
def test__set_stop_loss_isolated_liq(fee):
def test_set_stop_loss_isolated_liq(fee):
trade = Trade(
id=2,
pair='ADA/USDT',