From 03c16d034dcfc9f31e2c825eb9c53ccbc5490817 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 3 Aug 2025 19:46:43 +0200 Subject: [PATCH] test: add test for --dex filter --- tests/commands/test_commands.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/commands/test_commands.py b/tests/commands/test_commands.py index 3544bc2d6..3d75e9172 100644 --- a/tests/commands/test_commands.py +++ b/tests/commands/test_commands.py @@ -160,6 +160,19 @@ def test_list_exchanges(capsys): assert re.search(r"^bingx$", captured.out, re.MULTILINE) assert re.search(r"^bitmex$", captured.out, re.MULTILINE) + # Only dex + args = [ + "list-exchanges", + "--dex", + ] + + start_list_exchanges(get_args(args)) + captured = capsys.readouterr() + assert re.search(r"Exchanges available for Freqtrade.*", captured.out) + assert not re.search(r".*binance.*", captured.out) + assert not re.search(r".*bingx.*", captured.out) + assert re.search(r".*hyperliquid.*", captured.out) + def test_list_timeframes(mocker, capsys): api_mock = MagicMock()