status: return arrow object instead humanized str

This commit is contained in:
gcarq
2018-07-12 17:27:40 +02:00
parent 0920fb6120
commit 7eaeb8d146
4 changed files with 11 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ Unit test file for rpc/rpc.py
"""
from datetime import datetime
from unittest.mock import MagicMock
from unittest.mock import MagicMock, ANY
import pytest
@@ -59,7 +59,7 @@ def test_rpc_trade_status(default_conf, ticker, fee, markets, mocker) -> None:
'trade_id': 1,
'pair': 'ETH/BTC',
'market_url': 'https://bittrex.com/Market/Index?MarketName=BTC-ETH',
'date': 'just now',
'date': ANY,
'open_rate': 1.099e-05,
'close_rate': None,
'current_rate': 1.098e-05,

View File

@@ -11,6 +11,7 @@ from datetime import datetime
from random import randint
from unittest.mock import MagicMock, ANY
import arrow
from telegram import Chat, Message, Update
from telegram.error import NetworkError
@@ -198,6 +199,7 @@ def test_status(default_conf, update, mocker, fee, ticker, markets) -> None:
patch_get_signal(mocker, (True, False))
patch_coinmarketcap(mocker)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
validate_pairs=MagicMock(),
@@ -215,7 +217,7 @@ def test_status(default_conf, update, mocker, fee, ticker, markets) -> None:
'trade_id': 1,
'pair': 'ETH/BTC',
'market_url': 'https://bittrex.com/Market/Index?MarketName=BTC-ETH',
'date': 'just now',
'date': arrow.utcnow(),
'open_rate': 1.099e-05,
'close_rate': None,
'current_rate': 1.098e-05,