Add test for new formatting
This commit is contained in:
@@ -47,6 +47,11 @@ class InformativeDecoratorTest(IStrategy):
|
|||||||
dataframe['rsi'] = 14
|
dataframe['rsi'] = 14
|
||||||
return dataframe
|
return dataframe
|
||||||
|
|
||||||
|
@informative('1h', '{base}/BTC')
|
||||||
|
def populate_indicators_base_1h(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||||
|
dataframe['rsi'] = 14
|
||||||
|
return dataframe
|
||||||
|
|
||||||
# Quote currency different from stake currency test.
|
# Quote currency different from stake currency test.
|
||||||
@informative('1h', 'ETH/BTC', candle_type='spot')
|
@informative('1h', 'ETH/BTC', candle_type='spot')
|
||||||
def populate_indicators_eth_btc_1h(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
def populate_indicators_eth_btc_1h(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||||
|
|||||||
@@ -277,9 +277,11 @@ def test_informative_decorator(mocker, default_conf_usdt, trading_mode):
|
|||||||
('XRP/USDT', '5m', candle_def): test_data_5m,
|
('XRP/USDT', '5m', candle_def): test_data_5m,
|
||||||
('XRP/USDT', '30m', candle_def): test_data_30m,
|
('XRP/USDT', '30m', candle_def): test_data_30m,
|
||||||
('XRP/USDT', '1h', candle_def): test_data_1h,
|
('XRP/USDT', '1h', candle_def): test_data_1h,
|
||||||
|
('XRP/BTC', '1h', candle_def): test_data_1h, # from {base}/BTC
|
||||||
('LTC/USDT', '5m', candle_def): test_data_5m,
|
('LTC/USDT', '5m', candle_def): test_data_5m,
|
||||||
('LTC/USDT', '30m', candle_def): test_data_30m,
|
('LTC/USDT', '30m', candle_def): test_data_30m,
|
||||||
('LTC/USDT', '1h', candle_def): test_data_1h,
|
('LTC/USDT', '1h', candle_def): test_data_1h,
|
||||||
|
('LTC/BTC', '1h', candle_def): test_data_1h, # from {base}/BTC
|
||||||
('NEO/USDT', '30m', candle_def): test_data_30m,
|
('NEO/USDT', '30m', candle_def): test_data_30m,
|
||||||
('NEO/USDT', '5m', CandleType.SPOT): test_data_5m, # Explicit request with '' as candletype
|
('NEO/USDT', '5m', CandleType.SPOT): test_data_5m, # Explicit request with '' as candletype
|
||||||
('NEO/USDT', '15m', candle_def): test_data_5m, # Explicit request with '' as candletype
|
('NEO/USDT', '15m', candle_def): test_data_5m, # Explicit request with '' as candletype
|
||||||
@@ -296,10 +298,12 @@ def test_informative_decorator(mocker, default_conf_usdt, trading_mode):
|
|||||||
'XRP/USDT', 'LTC/USDT', 'NEO/USDT'
|
'XRP/USDT', 'LTC/USDT', 'NEO/USDT'
|
||||||
])
|
])
|
||||||
|
|
||||||
assert len(strategy._ft_informative) == 6 # Equal to number of decorators used
|
assert len(strategy._ft_informative) == 7 # Equal to number of decorators used
|
||||||
informative_pairs = [
|
informative_pairs = [
|
||||||
('XRP/USDT', '1h', candle_def),
|
('XRP/USDT', '1h', candle_def),
|
||||||
|
('XRP/BTC', '1h', candle_def),
|
||||||
('LTC/USDT', '1h', candle_def),
|
('LTC/USDT', '1h', candle_def),
|
||||||
|
('LTC/BTC', '1h', candle_def),
|
||||||
('XRP/USDT', '30m', candle_def),
|
('XRP/USDT', '30m', candle_def),
|
||||||
('LTC/USDT', '30m', candle_def),
|
('LTC/USDT', '30m', candle_def),
|
||||||
('NEO/USDT', '1h', candle_def),
|
('NEO/USDT', '1h', candle_def),
|
||||||
|
|||||||
Reference in New Issue
Block a user