Eliminate asyncio warnings in tests

This commit is contained in:
hroff-1902
2019-09-10 13:45:30 +03:00
parent f987e6e0f9
commit 869a5b4901
4 changed files with 40 additions and 24 deletions

View File

@@ -69,7 +69,8 @@ def test_init(default_conf, mocker, caplog):
assert log_has('Instance is running with dry_run enabled', caplog)
def test_init_ccxt_kwargs(default_conf, mocker, caplog):
@pytest.mark.asyncio
async def test_init_ccxt_kwargs(default_conf, mocker, caplog):
mocker.patch('freqtrade.exchange.Exchange._load_markets', MagicMock(return_value={}))
caplog.set_level(logging.INFO)
conf = copy.deepcopy(default_conf)
@@ -1362,7 +1363,8 @@ def test_get_order(default_conf, mocker, exchange_name):
@pytest.mark.parametrize("exchange_name", EXCHANGES)
def test_name(default_conf, mocker, exchange_name):
@pytest.mark.asyncio
async def test_name(default_conf, mocker, exchange_name):
mocker.patch('freqtrade.exchange.Exchange._load_markets', MagicMock(return_value={}))
default_conf['exchange']['name'] = exchange_name
exchange = Exchange(default_conf)