mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
chore: add test for trades_get_available_data
This commit is contained in:
@@ -519,6 +519,21 @@ def test_datahandler_trades_purge(mocker, testdatadir, datahandler):
|
||||
assert unlinkmock.call_count == 1
|
||||
|
||||
|
||||
def test_datahandler_trades_get_available_data(testdatadir):
|
||||
paircombs = FeatherDataHandler.trades_get_available_data(testdatadir, TradingMode.SPOT)
|
||||
# Convert to set to avoid failures due to sorting
|
||||
assert set(paircombs) == {"XRP/ETH"}
|
||||
|
||||
paircombs = FeatherDataHandler.trades_get_available_data(testdatadir, TradingMode.FUTURES)
|
||||
# Convert to set to avoid failures due to sorting
|
||||
assert set(paircombs) == set()
|
||||
|
||||
paircombs = JsonGzDataHandler.trades_get_available_data(testdatadir, TradingMode.SPOT)
|
||||
assert set(paircombs) == {"XRP/ETH", "XRP/OLD"}
|
||||
paircombs = HDF5DataHandler.trades_get_available_data(testdatadir, TradingMode.SPOT)
|
||||
assert set(paircombs) == {"XRP/ETH"}
|
||||
|
||||
|
||||
def test_gethandlerclass():
|
||||
cl = get_datahandlerclass("json")
|
||||
assert cl == JsonDataHandler
|
||||
|
||||
Reference in New Issue
Block a user