From bbd7579aa8c3bc418698fb79c51cc4d34c61eeed Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 24 May 2020 09:07:24 +0200 Subject: [PATCH] Fix more tests --- tests/rpc/test_rpc.py | 2 ++ tests/rpc/test_rpc_apiserver.py | 2 ++ tests/test_persistence.py | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/tests/rpc/test_rpc.py b/tests/rpc/test_rpc.py index 03c6ebd35..5d278895b 100644 --- a/tests/rpc/test_rpc.py +++ b/tests/rpc/test_rpc.py @@ -76,6 +76,7 @@ def test_rpc_trade_status(default_conf, ticker, fee, mocker) -> None: 'amount': 91.07468124, 'stake_amount': 0.001, 'close_profit': None, + 'close_profit_perc': None, 'current_profit': -0.00408133, 'current_profit_perc': -0.41, 'stop_loss': 0.0, @@ -123,6 +124,7 @@ def test_rpc_trade_status(default_conf, ticker, fee, mocker) -> None: 'amount': 91.07468124, 'stake_amount': 0.001, 'close_profit': None, + 'close_profit_perc': None, 'current_profit': ANY, 'current_profit_perc': ANY, 'stop_loss': 0.0, diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index 69985bef8..1c0df9903 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -420,7 +420,9 @@ def test_api_profit(botclient, mocker, ticker, fee, markets, limit_buy_order, li 'best_pair': 'ETH/BTC', 'best_rate': 6.2, 'first_trade_date': 'just now', + 'first_trade_timestamp': ANY, 'latest_trade_date': 'just now', + 'latest_trade_timestamp': ANY, 'profit_all_coin': 6.217e-05, 'profit_all_fiat': 0, 'profit_all_percent': 6.2, diff --git a/tests/test_persistence.py b/tests/test_persistence.py index 25afed397..60bf073f8 100644 --- a/tests/test_persistence.py +++ b/tests/test_persistence.py @@ -739,9 +739,11 @@ def test_to_json(default_conf, fee): 'is_open': None, 'open_date_hum': '2 hours ago', 'open_date': trade.open_date.strftime("%Y-%m-%d %H:%M:%S"), + 'open_timestamp': int(trade.open_date.timestamp() * 1000), 'open_order_id': 'dry_run_buy_12345', 'close_date_hum': None, 'close_date': None, + 'close_timestamp': None, 'open_rate': 0.123, 'open_rate_requested': None, 'open_trade_price': 15.1668225, @@ -787,8 +789,10 @@ def test_to_json(default_conf, fee): 'pair': 'XRP/BTC', 'open_date_hum': '2 hours ago', 'open_date': trade.open_date.strftime("%Y-%m-%d %H:%M:%S"), + 'open_timestamp': int(trade.open_date.timestamp() * 1000), 'close_date_hum': 'an hour ago', 'close_date': trade.close_date.strftime("%Y-%m-%d %H:%M:%S"), + 'close_timestamp': int(trade.close_date.timestamp() * 1000), 'open_rate': 0.123, 'close_rate': 0.125, 'amount': 100.0,