From a325f1ce2bb05df4d7e086c7b7fe0d8da21f9763 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 13 Aug 2019 10:01:43 +0200 Subject: [PATCH] adapt some tests since create_trade() can now buy multiple times, we need to use execute_buy() to create a single trade --- freqtrade/tests/test_freqtradebot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/freqtrade/tests/test_freqtradebot.py b/freqtrade/tests/test_freqtradebot.py index f70b5374e..ba978e7ad 100644 --- a/freqtrade/tests/test_freqtradebot.py +++ b/freqtrade/tests/test_freqtradebot.py @@ -253,13 +253,14 @@ def test_get_trade_stake_amount_unlimited_amount(default_conf, assert result == default_conf['stake_amount'] / conf['max_open_trades'] # create one trade, order amount should be 'balance / (max_open_trades - num_open_trades)' - freqtrade.create_trade() + # freqtrade.create_trade() + freqtrade.execute_buy('ETH/BTC', result) result = freqtrade._get_trade_stake_amount('LTC/BTC') assert result == default_conf['stake_amount'] / (conf['max_open_trades'] - 1) # create 2 trades, order amount should be None - freqtrade.create_trade() + freqtrade.execute_buy('LTC/BTC', result) result = freqtrade._get_trade_stake_amount('XRP/BTC') assert result is None