Fixing unitest

This commit is contained in:
Jean-Baptiste LE STANG 2018-01-07 21:26:43 +01:00
commit f4e4104d14

View File

@ -166,6 +166,7 @@ def test_get_ticker(mocker, ticker):
api_mock.get_ticker = MagicMock(return_value=tick)
mocker.patch('freqtrade.exchange.bittrex._API', api_mock)
# retrieve original ticker
ticker = get_ticker(pair='BTC_ETH')
assert ticker['bid'] == 0.00001098
assert ticker['ask'] == 0.00001099
@ -181,6 +182,7 @@ def test_get_ticker(mocker, ticker):
assert ticker['bid'] == 0.00001098
assert ticker['ask'] == 0.00001099
# force ticker refresh
ticker = get_ticker(pair='BTC_ETH', refresh=True)
assert ticker['bid'] == 0.5
assert ticker['ask'] == 1