From 420a8c2b1c20d0b2f9d87363f68731daccfff172 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 13 Aug 2020 11:36:58 +0200 Subject: [PATCH] Improve tests for rpc/forcebuy --- tests/conftest.py | 1 + tests/rpc/test_rpc.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 1ac8256a8..b8367f36d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -827,6 +827,7 @@ def limit_buy_order(): 'side': 'buy', 'symbol': 'mocked', 'datetime': arrow.utcnow().isoformat(), + 'timestamp': arrow.utcnow().timestamp, 'price': 0.00001099, 'amount': 90.99181073, 'filled': 90.99181073, diff --git a/tests/rpc/test_rpc.py b/tests/rpc/test_rpc.py index 9bbd34672..5af6a42cb 100644 --- a/tests/rpc/test_rpc.py +++ b/tests/rpc/test_rpc.py @@ -817,7 +817,8 @@ def test_rpc_count(mocker, default_conf, ticker, fee) -> None: def test_rpcforcebuy(mocker, default_conf, ticker, fee, limit_buy_order) -> None: default_conf['forcebuy_enable'] = True mocker.patch('freqtrade.rpc.telegram.Telegram', MagicMock()) - buy_mm = MagicMock(return_value={'id': limit_buy_order['id']}) + limit_buy_order['status'] = 'open' + buy_mm = MagicMock(return_value=limit_buy_order) mocker.patch.multiple( 'freqtrade.exchange.Exchange', get_balances=MagicMock(return_value=ticker),