update unfilledtimeout settings to entry/exit

This commit is contained in:
Matthias
2022-03-26 11:55:11 +01:00
parent 6f1b14c013
commit 0624817242
16 changed files with 103 additions and 32 deletions

View File

@@ -963,7 +963,7 @@ def test_validate_time_in_force(default_conf, caplog) -> None:
validate_config_consistency(conf)
def test_validate_order_types(default_conf, caplog) -> None:
def test__validate_order_types(default_conf, caplog) -> None:
conf = deepcopy(default_conf)
conf['order_types'] = {
'buy': 'limit',
@@ -998,6 +998,31 @@ def test_validate_order_types(default_conf, caplog) -> None:
validate_config_consistency(conf)
def test__validate_unfilledtimeout(default_conf, caplog) -> None:
conf = deepcopy(default_conf)
conf['unfilledtimeout'] = {
'buy': 30,
'sell': 35,
}
validate_config_consistency(conf)
assert log_has_re(r"DEPRECATED: Using 'buy' and 'sell' for unfilledtimeout is.*", caplog)
assert conf['unfilledtimeout']['entry'] == 30
assert conf['unfilledtimeout']['exit'] == 35
assert 'buy' not in conf['unfilledtimeout']
assert 'sell' not in conf['unfilledtimeout']
conf = deepcopy(default_conf)
conf['unfilledtimeout'] = {
'buy': 30,
'sell': 35,
}
conf['trading_mode'] = 'futures'
with pytest.raises(
OperationalException,
match=r"Please migrate your unfilledtimeout settings to use the new wording\."):
validate_config_consistency(conf)
def test_load_config_test_comments() -> None:
"""
Load config with comments