From 4ad049aec3a6eb2e6ed327b37ee7951d157685f7 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 3 Aug 2025 19:50:24 +0200 Subject: [PATCH] test: add test-case for futures filter --- tests/commands/test_commands.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/commands/test_commands.py b/tests/commands/test_commands.py index 3d75e9172..85e42c11d 100644 --- a/tests/commands/test_commands.py +++ b/tests/commands/test_commands.py @@ -133,6 +133,8 @@ def test_list_exchanges(capsys): captured = capsys.readouterr() assert re.search(r"^binance$", captured.out, re.MULTILINE) assert re.search(r"^bybit$", captured.out, re.MULTILINE) + # An exchange not supporting futures + assert re.search(r"^kraken$", captured.out, re.MULTILINE) # Test with --all args = [ @@ -173,6 +175,19 @@ def test_list_exchanges(capsys): assert not re.search(r".*bingx.*", captured.out) assert re.search(r".*hyperliquid.*", captured.out) + # Only futures + args = [ + "list-exchanges", + "--trading-mode", + "futures", + ] + + start_list_exchanges(get_args(args)) + captured = capsys.readouterr() + assert re.search(r"Exchanges available for Freqtrade.*", captured.out) + assert re.search(r".*binance.*", captured.out) + assert not re.search(r".*kraken.*", captured.out) + def test_list_timeframes(mocker, capsys): api_mock = MagicMock()