remove unused method parameter
This commit is contained in:
parent
95ab7c84bc
commit
5505845c6f
@ -55,7 +55,7 @@ def refresh_whitelist(whitelist: List[str]) -> List[str]:
|
||||
return final_list
|
||||
|
||||
|
||||
def process_maybe_execute_buy(conf, interval):
|
||||
def process_maybe_execute_buy(interval):
|
||||
"""
|
||||
Tries to execute a buy trade in a safe way
|
||||
:return: True if executed
|
||||
@ -115,7 +115,7 @@ def _process(interval: int, nb_assets: Optional[int] = 0) -> bool:
|
||||
# Query trades from persistence layer
|
||||
trades = Trade.query.filter(Trade.is_open.is_(True)).all()
|
||||
if len(trades) < _CONF['max_open_trades']:
|
||||
state_changed = process_maybe_execute_buy(_CONF, interval)
|
||||
state_changed = process_maybe_execute_buy(interval)
|
||||
|
||||
for trade in trades:
|
||||
state_changed |= process_maybe_execute_sell(trade, interval)
|
||||
|
@ -50,9 +50,9 @@ def test_main_start_hyperopt(mocker):
|
||||
def test_process_maybe_execute_buy(default_conf, mocker):
|
||||
mocker.patch.dict('freqtrade.main._CONF', default_conf)
|
||||
mocker.patch('freqtrade.main.create_trade', return_value=True)
|
||||
assert main.process_maybe_execute_buy(default_conf, int(default_conf['ticker_interval']))
|
||||
assert main.process_maybe_execute_buy(int(default_conf['ticker_interval']))
|
||||
mocker.patch('freqtrade.main.create_trade', return_value=False)
|
||||
assert not main.process_maybe_execute_buy(default_conf, int(default_conf['ticker_interval']))
|
||||
assert not main.process_maybe_execute_buy(int(default_conf['ticker_interval']))
|
||||
|
||||
|
||||
def test_process_maybe_execute_sell(default_conf, mocker):
|
||||
@ -71,7 +71,7 @@ def test_process_maybe_execute_sell(default_conf, mocker):
|
||||
def test_process_maybe_execute_buy_exception(default_conf, mocker, caplog):
|
||||
mocker.patch.dict('freqtrade.main._CONF', default_conf)
|
||||
mocker.patch('freqtrade.main.create_trade', MagicMock(side_effect=DependencyException))
|
||||
main.process_maybe_execute_buy(default_conf, int(default_conf['ticker_interval']))
|
||||
main.process_maybe_execute_buy(int(default_conf['ticker_interval']))
|
||||
tt.log_has('Unable to create trade:', caplog.record_tuples)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user