From 31ddec834816d980d2802810868b62f44df787d1 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 27 Jul 2022 06:51:56 +0200 Subject: [PATCH] Add missing test to confirm backtesting won't send messages --- tests/data/test_dataprovider.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/data/test_dataprovider.py b/tests/data/test_dataprovider.py index 843d60786..49603feac 100644 --- a/tests/data/test_dataprovider.py +++ b/tests/data/test_dataprovider.py @@ -330,3 +330,8 @@ def test_dp_send_msg(default_conf): assert msg not in dp._msg_queue dp.send_msg(msg, always_send=True) assert msg in dp._msg_queue + + default_conf["runmode"] = RunMode.BACKTEST + dp = DataProvider(default_conf, None) + dp.send_msg(msg, always_send=True) + assert msg not in dp._msg_queue