mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-04-28 21:10:12 +00:00
Merge branch 'develop' into feature/fetch-public-trades
This commit is contained in:
@@ -151,9 +151,7 @@ def test_load_data_with_new_pair_1min(
|
||||
)
|
||||
load_pair_history(datadir=tmp_path, timeframe="1m", pair="MEME/BTC", candle_type=candle_type)
|
||||
assert file.is_file()
|
||||
assert log_has_re(
|
||||
r'\(0/1\) - Download history data for "MEME/BTC", 1m, ' r"spot and store in .*", caplog
|
||||
)
|
||||
assert log_has_re(r'Download history data for "MEME/BTC", 1m, ' r"spot and store in .*", caplog)
|
||||
|
||||
|
||||
def test_testdata_path(testdatadir) -> None:
|
||||
|
||||
@@ -600,7 +600,7 @@ async def test__async_get_historic_ohlcv_binance(default_conf, mocker, caplog, c
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"pair,nominal_value,mm_ratio,amt",
|
||||
"pair,notional_value,mm_ratio,amt",
|
||||
[
|
||||
("XRP/USDT:USDT", 0.0, 0.025, 0),
|
||||
("BNB/USDT:USDT", 100.0, 0.0065, 0),
|
||||
@@ -615,12 +615,12 @@ def test_get_maintenance_ratio_and_amt_binance(
|
||||
mocker,
|
||||
leverage_tiers,
|
||||
pair,
|
||||
nominal_value,
|
||||
notional_value,
|
||||
mm_ratio,
|
||||
amt,
|
||||
):
|
||||
mocker.patch(f"{EXMS}.exchange_has", return_value=True)
|
||||
exchange = get_patched_exchange(mocker, default_conf, exchange="binance")
|
||||
exchange._leverage_tiers = leverage_tiers
|
||||
(result_ratio, result_amt) = exchange.get_maintenance_ratio_and_amt(pair, nominal_value)
|
||||
(result_ratio, result_amt) = exchange.get_maintenance_ratio_and_amt(pair, notional_value)
|
||||
assert (round(result_ratio, 8), round(result_amt, 8)) == (mm_ratio, amt)
|
||||
|
||||
Reference in New Issue
Block a user