Changes based on review comments
This commit is contained in:
@@ -112,15 +112,12 @@ def test_ignore_expired_candle(default_conf, ohlcv_history):
|
||||
strategy.ignore_buying_expired_candle = True
|
||||
strategy.ignore_buying_expired_candle_after = 60
|
||||
|
||||
ohlcv_history.loc[-1, 'date'] = arrow.utcnow().shift(minutes=-3)
|
||||
ohlcv_history.loc[-1, 'date'] = arrow.utcnow()
|
||||
# Take a copy to correctly modify the call
|
||||
mocked_history = ohlcv_history.copy()
|
||||
mocked_history['sell'] = 0
|
||||
mocked_history['buy'] = 0
|
||||
mocked_history.loc[1, 'buy'] = 1
|
||||
mocked_history.loc[1, 'sell'] = 1
|
||||
latest_date = mocked_history['date'].max()
|
||||
|
||||
assert strategy.ignore_expired_candle(mocked_history, True) is True
|
||||
assert strategy.ignore_expired_candle(latest_date=latest_date, timeframe_seconds=300, buy=True) is True
|
||||
|
||||
|
||||
def test_assert_df_raise(mocker, caplog, ohlcv_history):
|
||||
|
Reference in New Issue
Block a user