Ensure bot_start is called when visualizing results
This commit is contained in:
		| @@ -1193,6 +1193,7 @@ class RPC: | ||||
|         from freqtrade.resolvers.strategy_resolver import StrategyResolver | ||||
|         strategy = StrategyResolver.load_strategy(config) | ||||
|         strategy.dp = DataProvider(config, exchange=exchange, pairlists=None) | ||||
|         strategy.ft_bot_start() | ||||
|  | ||||
|         df_analyzed = strategy.analyze_ticker(_data[pair], {'pair': pair}) | ||||
|  | ||||
|   | ||||
| @@ -1403,10 +1403,10 @@ def test_api_pair_candles(botclient, ohlcv_history): | ||||
|              ]) | ||||
|  | ||||
|  | ||||
| def test_api_pair_history(botclient, ohlcv_history): | ||||
| def test_api_pair_history(botclient, mocker): | ||||
|     ftbot, client = botclient | ||||
|     timeframe = '5m' | ||||
|  | ||||
|     lfm = mocker.patch('freqtrade.strategy.interface.IStrategy.load_freqAI_model') | ||||
|     # No pair | ||||
|     rc = client_get(client, | ||||
|                     f"{BASE_URI}/pair_history?timeframe={timeframe}" | ||||
| @@ -1440,6 +1440,7 @@ def test_api_pair_history(botclient, ohlcv_history): | ||||
|     assert len(rc.json()['data']) == rc.json()['length'] | ||||
|     assert 'columns' in rc.json() | ||||
|     assert 'data' in rc.json() | ||||
|     assert lfm.call_count == 1 | ||||
|     assert rc.json()['pair'] == 'UNITTEST/BTC' | ||||
|     assert rc.json()['strategy'] == CURRENT_TEST_STRATEGY | ||||
|     assert rc.json()['data_start'] == '2018-01-11 00:00:00+00:00' | ||||
|   | ||||
		Reference in New Issue
	
	Block a user