flake
This commit is contained in:
parent
ef1885c38b
commit
32df73c056
@ -63,7 +63,8 @@ def patch_exchange(mocker, api_mock=None, id='bittrex', mock_markets=True) -> No
|
||||
mocker.patch('freqtrade.exchange.Exchange.id', PropertyMock(return_value=id))
|
||||
mocker.patch('freqtrade.exchange.Exchange.name', PropertyMock(return_value=id.title()))
|
||||
if mock_markets:
|
||||
mocker.patch('freqtrade.exchange.Exchange.markets', PropertyMock(return_value=get_markets()))
|
||||
mocker.patch('freqtrade.exchange.Exchange.markets',
|
||||
PropertyMock(return_value=get_markets()))
|
||||
|
||||
if api_mock:
|
||||
mocker.patch('freqtrade.exchange.Exchange._init_ccxt', MagicMock(return_value=api_mock))
|
||||
@ -71,7 +72,8 @@ def patch_exchange(mocker, api_mock=None, id='bittrex', mock_markets=True) -> No
|
||||
mocker.patch('freqtrade.exchange.Exchange._init_ccxt', MagicMock())
|
||||
|
||||
|
||||
def get_patched_exchange(mocker, config, api_mock=None, id='bittrex', mock_markets=True) -> Exchange:
|
||||
def get_patched_exchange(mocker, config, api_mock=None, id='bittrex',
|
||||
mock_markets=True) -> Exchange:
|
||||
patch_exchange(mocker, api_mock, id, mock_markets)
|
||||
config["exchange"]["name"] = id
|
||||
try:
|
||||
|
@ -9,12 +9,11 @@ from numpy import isnan
|
||||
|
||||
from freqtrade import DependencyException, TemporaryError
|
||||
from freqtrade.edge import PairInfo
|
||||
from freqtrade.freqtradebot import FreqtradeBot
|
||||
from freqtrade.persistence import Trade
|
||||
from freqtrade.rpc import RPC, RPCException
|
||||
from freqtrade.rpc.fiat_convert import CryptoToFiatConverter
|
||||
from freqtrade.state import State
|
||||
from tests.conftest import patch_exchange, patch_get_signal, get_patched_freqtradebot
|
||||
from tests.conftest import patch_get_signal, get_patched_freqtradebot
|
||||
|
||||
|
||||
# Functions for recurrent object patching
|
||||
|
@ -378,7 +378,8 @@ def test_list_markets(mocker, markets, capsys):
|
||||
]
|
||||
start_list_markets(get_args(args), False)
|
||||
captured = capsys.readouterr()
|
||||
assert ('["BLK/BTC","ETH/BTC","ETH/USDT","LTC/BTC","LTC/USD","NEO/BTC","TKN/BTC","XLTCUSDT","XRP/BTC"]'
|
||||
assert ('["BLK/BTC","ETH/BTC","ETH/USDT","LTC/BTC","LTC/USD","NEO/BTC",'
|
||||
'"TKN/BTC","XLTCUSDT","XRP/BTC"]'
|
||||
in captured.out)
|
||||
|
||||
# Test --print-csv
|
||||
|
Loading…
Reference in New Issue
Block a user