ruff format: Update test strategies

This commit is contained in:
Matthias
2024-05-12 15:41:07 +02:00
parent 099b1fc8c4
commit 8c7d80b78e
23 changed files with 420 additions and 462 deletions
+6 -7
View File
@@ -4,22 +4,21 @@ from freqtrade.util.migrations import migrate_funding_fee_timeframe
def test_migrate_funding_rate_timeframe(default_conf_usdt, tmp_path, testdatadir):
copytree(testdatadir / 'futures', tmp_path / 'futures')
file_4h = tmp_path / 'futures' / 'XRP_USDT_USDT-4h-funding_rate.feather'
file_8h = tmp_path / 'futures' / 'XRP_USDT_USDT-8h-funding_rate.feather'
file_1h = tmp_path / 'futures' / 'XRP_USDT_USDT-1h-futures.feather'
copytree(testdatadir / "futures", tmp_path / "futures")
file_4h = tmp_path / "futures" / "XRP_USDT_USDT-4h-funding_rate.feather"
file_8h = tmp_path / "futures" / "XRP_USDT_USDT-8h-funding_rate.feather"
file_1h = tmp_path / "futures" / "XRP_USDT_USDT-1h-futures.feather"
file_8h.rename(file_4h)
assert file_1h.exists()
assert file_4h.exists()
assert not file_8h.exists()
default_conf_usdt['datadir'] = tmp_path
default_conf_usdt["datadir"] = tmp_path
# Inactive on spot trading ...
migrate_funding_fee_timeframe(default_conf_usdt, None)
default_conf_usdt['trading_mode'] = 'futures'
default_conf_usdt["trading_mode"] = "futures"
migrate_funding_fee_timeframe(default_conf_usdt, None)