autopep8 applied

This commit is contained in:
misagh 2018-10-04 18:07:47 +02:00
parent 06d75a8bad
commit 77cac9e562
2 changed files with 17 additions and 7 deletions

View File

@ -57,12 +57,15 @@ def patch_edge(mocker) -> None:
mocker.patch('freqtrade.edge.Edge.stoploss', MagicMock(return_value=-0.20))
mocker.patch('freqtrade.edge.Edge.calculate', MagicMock(return_value=True))
def get_patched_edge(mocker, config) -> Edge:
patch_edge(mocker)
edge = Edge(config)
return edge
# Functions for recurrent object patching
def get_patched_freqtradebot(mocker, config) -> FreqtradeBot:
"""
This function patch _init_modules() to not call dependencies

View File

@ -268,7 +268,13 @@ def test_edge_overrides_stake_amount(mocker, default_conf) -> None:
assert freqtrade._get_trade_stake_amount('LTC/BTC') == 0.02381
def test_edge_overrides_stoploss(limit_buy_order, fee, markets, caplog, mocker, default_conf) -> None:
def test_edge_overrides_stoploss(
limit_buy_order,
fee,
markets,
caplog,
mocker,
default_conf) -> None:
default_conf['edge']['enabled'] = True
patch_RPCManager(mocker)
patch_exchange(mocker)
@ -345,6 +351,7 @@ def test_edge_should_ignore_strategy_stoploss(limit_buy_order, fee, markets,
# stoploss shoud be hit
assert freqtrade.handle_trade(trade) is False
def test_get_min_pair_stake_amount(mocker, default_conf) -> None:
patch_RPCManager(mocker)
patch_exchange(mocker)