mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-03 21:00:25 +00:00
test: add test-case for futures filter
This commit is contained in:
@@ -133,6 +133,8 @@ def test_list_exchanges(capsys):
|
|||||||
captured = capsys.readouterr()
|
captured = capsys.readouterr()
|
||||||
assert re.search(r"^binance$", captured.out, re.MULTILINE)
|
assert re.search(r"^binance$", captured.out, re.MULTILINE)
|
||||||
assert re.search(r"^bybit$", 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
|
# Test with --all
|
||||||
args = [
|
args = [
|
||||||
@@ -173,6 +175,19 @@ def test_list_exchanges(capsys):
|
|||||||
assert not re.search(r".*bingx.*", captured.out)
|
assert not re.search(r".*bingx.*", captured.out)
|
||||||
assert re.search(r".*hyperliquid.*", 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):
|
def test_list_timeframes(mocker, capsys):
|
||||||
api_mock = MagicMock()
|
api_mock = MagicMock()
|
||||||
|
|||||||
Reference in New Issue
Block a user