diff --git a/tests/data/test_datahandler.py b/tests/data/test_datahandler.py index b8bb5661f..38f658dfb 100644 --- a/tests/data/test_datahandler.py +++ b/tests/data/test_datahandler.py @@ -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