Skip to content

Commit 03c16d0

Browse files
committed
test: add test for --dex filter
1 parent c1f8dce commit 03c16d0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/commands/test_commands.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,19 @@ def test_list_exchanges(capsys):
160160
assert re.search(r"^bingx$", captured.out, re.MULTILINE)
161161
assert re.search(r"^bitmex$", captured.out, re.MULTILINE)
162162

163+
# Only dex
164+
args = [
165+
"list-exchanges",
166+
"--dex",
167+
]
168+
169+
start_list_exchanges(get_args(args))
170+
captured = capsys.readouterr()
171+
assert re.search(r"Exchanges available for Freqtrade.*", captured.out)
172+
assert not re.search(r".*binance.*", captured.out)
173+
assert not re.search(r".*bingx.*", captured.out)
174+
assert re.search(r".*hyperliquid.*", captured.out)
175+
163176

164177
def test_list_timeframes(mocker, capsys):
165178
api_mock = MagicMock()

0 commit comments

Comments
 (0)