File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,8 @@ def test_list_exchanges(capsys):
133133 captured = capsys .readouterr ()
134134 assert re .search (r"^binance$" , captured .out , re .MULTILINE )
135135 assert re .search (r"^bybit$" , captured .out , re .MULTILINE )
136+ # An exchange not supporting futures
137+ assert re .search (r"^kraken$" , captured .out , re .MULTILINE )
136138
137139 # Test with --all
138140 args = [
@@ -173,6 +175,19 @@ def test_list_exchanges(capsys):
173175 assert not re .search (r".*bingx.*" , captured .out )
174176 assert re .search (r".*hyperliquid.*" , captured .out )
175177
178+ # Only futures
179+ args = [
180+ "list-exchanges" ,
181+ "--trading-mode" ,
182+ "futures" ,
183+ ]
184+
185+ start_list_exchanges (get_args (args ))
186+ captured = capsys .readouterr ()
187+ assert re .search (r"Exchanges available for Freqtrade.*" , captured .out )
188+ assert re .search (r".*binance.*" , captured .out )
189+ assert not re .search (r".*kraken.*" , captured .out )
190+
176191
177192def test_list_timeframes (mocker , capsys ):
178193 api_mock = MagicMock ()
You can’t perform that action at this time.
0 commit comments