really fixing this stuff ...

This commit is contained in:
Jean-Baptiste LE STANG 2018-01-13 09:21:49 +01:00
parent 3a4ff4c76c
commit 658d16c2cd

View File

@ -558,14 +558,16 @@ def test_execute_sell_without_conf_sell_down(default_conf, ticker, ticker_sell_d
mocker.patch.multiple('freqtrade.main.exchange', mocker.patch.multiple('freqtrade.main.exchange',
validate_pairs=MagicMock(), validate_pairs=MagicMock(),
get_ticker=ticker_sell_down) get_ticker=ticker_sell_down)
mocker.patch('freqtrade.main._CONF', {})
execute_sell(trade=trade, limit=ticker_sell_down()['bid']) execute_sell(trade=trade, limit=ticker_sell_down()['bid'])
print(rpc_mock.call_args_list[-1][0][0])
assert rpc_mock.call_count == 2 assert rpc_mock.call_count == 2
assert 'Selling [BTC/ETH]' in rpc_mock.call_args_list[-1][0][0] assert 'Selling [BTC/ETH]' in rpc_mock.call_args_list[-1][0][0]
assert '0.00001044' in rpc_mock.call_args_list[-1][0][0] assert '0.00001044' in rpc_mock.call_args_list[-1][0][0]
assert 'loss: -5.48%, -0.00005492' in rpc_mock.call_args_list[-1][0][0] assert 'loss: -5.48%, -0.00005492' in rpc_mock.call_args_list[-1][0][0]
assert '-0.796 USD' in rpc_mock.call_args_list[-1][0][0]
def test_execute_sell_without_conf_sell_up(default_conf, ticker, ticker_sell_up, mocker): def test_execute_sell_without_conf_sell_up(default_conf, ticker, ticker_sell_up, mocker):