Use lambdas instead of a static number of side-effects.

This commit is contained in:
Rokas Kupstys 2021-11-06 10:23:46 +02:00
parent 8a4236198f
commit 98b475a00b

View File

@ -4760,21 +4760,12 @@ def test_update_funding_fees(mocker, default_conf, time_machine, fee):
mocker.patch( mocker.patch(
'freqtrade.exchange.Exchange._get_mark_price_history', 'freqtrade.exchange.Exchange._get_mark_price_history',
side_effect=[ side_effect=lambda pair, since: mark_prices[pair]
mark_prices["LTC/BTC"],
mark_prices["ETH/BTC"],
mark_prices["ETC/BTC"],
mark_prices["XRP/BTC"],
]
) )
mocker.patch( mocker.patch(
'freqtrade.exchange.Exchange.get_funding_rate_history', 'freqtrade.exchange.Exchange.get_funding_rate_history',
side_effect=[ side_effect=lambda pair, since: funding_rates[pair]
funding_rates["LTC/BTC"],
funding_rates["ETH/BTC"],
funding_rates["ETC/BTC"],
funding_rates["XRP/BTC"],
]
) )
patch_RPCManager(mocker) patch_RPCManager(mocker)
patch_exchange(mocker) patch_exchange(mocker)