mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-03 18:43:04 +00:00
Add unlock_at config test, simplify validation
This commit is contained in:
@@ -840,6 +840,21 @@ def test_validate_whitelist(default_conf):
|
||||
],
|
||||
r"Protections must specify either `stop_duration`.*",
|
||||
),
|
||||
(
|
||||
[
|
||||
{
|
||||
"method": "StoplossGuard",
|
||||
"lookback_period": 20,
|
||||
"stop_duration": 10,
|
||||
"unlock_at": "20:02",
|
||||
}
|
||||
],
|
||||
r"Protections must specify either `unlock_at`, `stop_duration` or.*",
|
||||
),
|
||||
(
|
||||
[{"method": "StoplossGuard", "lookback_period_candles": 20, "unlock_at": "20:02"}],
|
||||
None,
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_validate_protections(default_conf, protconf, expected):
|
||||
|
||||
Reference in New Issue
Block a user