From 97fd33d75267941102faa7a2ebb75defedb99cae Mon Sep 17 00:00:00 2001 From: misagh Date: Sat, 10 Nov 2018 18:03:46 +0100 Subject: [PATCH] adding test for process --- freqtrade/tests/test_freqtradebot.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/freqtrade/tests/test_freqtradebot.py b/freqtrade/tests/test_freqtradebot.py index 907d228d6..e83163a30 100644 --- a/freqtrade/tests/test_freqtradebot.py +++ b/freqtrade/tests/test_freqtradebot.py @@ -246,6 +246,20 @@ def test_get_trade_stake_amount_unlimited_amount(default_conf, assert result is None +def test_edge_called_in_process(mocker, edge_conf) -> None: + patch_RPCManager(mocker) + patch_edge(mocker) + def _refresh_whitelist(list): + return ['ETH/BTC', 'LTC/BTC', 'XRP/BTC', 'NEO/BTC'] + + patch_exchange(mocker) + freqtrade = FreqtradeBot(edge_conf) + freqtrade._refresh_whitelist = _refresh_whitelist + patch_get_signal(freqtrade) + freqtrade._process() + assert freqtrade.active_pair_whitelist == ['NEO/BTC', 'LTC/BTC'] + + def test_edge_overrides_stake_amount(mocker, edge_conf) -> None: patch_RPCManager(mocker) patch_exchange(mocker)