Add simple verification that orderflow is configured correctly

This commit is contained in:
Matthias
2024-03-17 19:31:29 +01:00
parent 7e387f96ab
commit 1d5f2b64a2
2 changed files with 23 additions and 0 deletions
+14
View File
@@ -992,6 +992,20 @@ def test__validate_consumers(default_conf, caplog) -> None:
assert log_has_re("To receive best performance with external data.*", caplog)
def test__validate_orderflow(default_conf) -> None:
conf = deepcopy(default_conf)
conf['exchange']['use_public_trades'] = True
with pytest.raises(OperationalException,
match="Orderflow is a required configuration key when using public trades."):
validate_config_consistency(conf)
conf.update({'orderflow': {
"scale": 0.5,
}})
# Should pass.
validate_config_consistency(conf)
def test_load_config_test_comments() -> None:
"""
Load config with comments