Update more exchange mocks to use EXMS

This commit is contained in:
Matthias
2023-03-01 20:14:15 +01:00
parent bcdf4e0fe8
commit 2ca8b0b12e
11 changed files with 196 additions and 196 deletions

View File

@@ -507,7 +507,7 @@ def test_api_count(botclient, mocker, ticker, fee, markets, is_short):
ftbot, client = botclient
patch_get_signal(ftbot)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
get_balances=MagicMock(return_value=ticker),
fetch_ticker=ticker,
get_fee=fee,
@@ -594,7 +594,7 @@ def test_api_daily(botclient, mocker, ticker, fee, markets):
ftbot, client = botclient
patch_get_signal(ftbot)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
get_balances=MagicMock(return_value=ticker),
fetch_ticker=ticker,
get_fee=fee,
@@ -613,7 +613,7 @@ def test_api_trades(botclient, mocker, fee, markets, is_short):
ftbot, client = botclient
patch_get_signal(ftbot)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
markets=PropertyMock(return_value=markets)
)
rc = client_get(client, f"{BASE_URI}/trades")
@@ -644,7 +644,7 @@ def test_api_trade_single(botclient, mocker, fee, ticker, markets, is_short):
ftbot, client = botclient
patch_get_signal(ftbot, enter_long=not is_short, enter_short=is_short)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
markets=PropertyMock(return_value=markets),
fetch_ticker=ticker,
)
@@ -668,7 +668,7 @@ def test_api_delete_trade(botclient, mocker, fee, markets, is_short):
stoploss_mock = MagicMock()
cancel_mock = MagicMock()
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
markets=PropertyMock(return_value=markets),
cancel_order=cancel_mock,
cancel_stoploss_order=stoploss_mock,
@@ -713,7 +713,7 @@ def test_api_delete_open_order(botclient, mocker, fee, markets, ticker, is_short
stoploss_mock = MagicMock()
cancel_mock = MagicMock()
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
markets=PropertyMock(return_value=markets),
fetch_ticker=ticker,
cancel_order=cancel_mock,
@@ -780,7 +780,7 @@ def test_api_edge_disabled(botclient, mocker, ticker, fee, markets):
ftbot, client = botclient
patch_get_signal(ftbot)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
get_balances=MagicMock(return_value=ticker),
fetch_ticker=ticker,
get_fee=fee,
@@ -842,7 +842,7 @@ def test_api_profit(botclient, mocker, ticker, fee, markets, is_short, expected)
ftbot, client = botclient
patch_get_signal(ftbot)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
get_balances=MagicMock(return_value=ticker),
fetch_ticker=ticker,
get_fee=fee,
@@ -900,7 +900,7 @@ def test_api_stats(botclient, mocker, ticker, fee, markets, is_short):
ftbot, client = botclient
patch_get_signal(ftbot, enter_long=not is_short, enter_short=is_short)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
get_balances=MagicMock(return_value=ticker),
fetch_ticker=ticker,
get_fee=fee,
@@ -981,7 +981,7 @@ def test_api_status(botclient, mocker, ticker, fee, markets, is_short,
ftbot, client = botclient
patch_get_signal(ftbot)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
get_balances=MagicMock(return_value=ticker),
fetch_ticker=ticker,
get_fee=fee,
@@ -1274,7 +1274,7 @@ def test_api_force_entry(botclient, mocker, fee, endpoint):
def test_api_forceexit(botclient, mocker, ticker, fee, markets):
ftbot, client = botclient
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
get_balances=MagicMock(return_value=ticker),
fetch_ticker=ticker,
get_fee=fee,