populate sell signal

This commit is contained in:
Janne Sinivirta
2017-11-14 20:28:31 +02:00
committed by gcarq
parent c12a9ebd92
commit 1db0a7d4ce
2 changed files with 26 additions and 2 deletions

View File

@@ -37,3 +37,13 @@ def test_returns_latest_buy_signal(mocker):
buydf = DataFrame([{'buy': 0, 'date': datetime.today()}])
mocker.patch('freqtrade.analyze.analyze_ticker', return_value=buydf)
assert not get_signal('BTC-ETH', SignalType.BUY)
def test_returns_latest_sell_signal(mocker):
selldf = DataFrame([{'sell': 1, 'date': datetime.today()}])
mocker.patch('freqtrade.analyze.analyze_ticker', return_value=selldf)
assert get_signal('BTC-ETH', SignalType.SELL)
selldf = DataFrame([{'sell': 0, 'date': datetime.today()}])
mocker.patch('freqtrade.analyze.analyze_ticker', return_value=selldf)
assert not get_signal('BTC-ETH', SignalType.SELL)