Use Deprecated method for order_Time_in_force

This commit is contained in:
Matthias 2022-03-09 06:40:12 +01:00
parent 943d080f5e
commit 66afc233db
2 changed files with 6 additions and 2 deletions

View File

@ -230,8 +230,11 @@ def _validate_time_in_force(conf: Dict[str, Any]) -> None:
"DEPRECATED: Using 'buy' and 'sell' for time_in_force is deprecated."
"Please migrate your time_in_force settings to use 'entry' and 'exit'."
)
time_in_force['entry'] = time_in_force.pop('buy')
time_in_force['exit'] = time_in_force.pop('sell')
process_deprecated_setting(
conf, 'order_time_in_force', 'buy', 'order_time_in_force', 'entry')
process_deprecated_setting(
conf, 'order_time_in_force', 'sell', 'order_time_in_force', 'exit')
def _validate_order_types(conf: Dict[str, Any]) -> None:

View File

@ -997,6 +997,7 @@ def test_validate_order_types(default_conf, caplog) -> None:
match=r"Please migrate your order_types settings to use the new wording\."):
validate_config_consistency(conf)
def test_load_config_test_comments() -> None:
"""
Load config with comments