diff --git a/tests/rpc/test_rpc_manager.py b/tests/rpc/test_rpc_manager.py index 7278f0671..c9fbf8c3b 100644 --- a/tests/rpc/test_rpc_manager.py +++ b/tests/rpc/test_rpc_manager.py @@ -1,5 +1,5 @@ # pragma pylint: disable=missing-docstring, C0103 - +import time import logging from unittest.mock import MagicMock @@ -176,6 +176,8 @@ def test_init_apiserver_enabled(mocker, default_conf, caplog) -> None: "listen_port": "8080"} rpc_manager = RPCManager(get_patched_freqtradebot(mocker, default_conf)) + # Sleep to allow the thread to start + time.sleep(0.5) assert log_has('Enabling rpc.api_server', caplog) assert len(rpc_manager.registered_modules) == 1 assert 'apiserver' in [mod.name for mod in rpc_manager.registered_modules]