diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index 9aa965da2..9a7bdfef6 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -52,6 +52,7 @@ def botclient(default_conf, mocker): try: apiserver = ApiServer(default_conf) apiserver.add_rpc_handler(rpc) + apiserver.start_api() yield ftbot, TestClient(apiserver.app) # Cleanup ... ? finally: @@ -332,6 +333,7 @@ def test_api_run(default_conf, mocker, caplog): apiserver = ApiServer(default_conf) apiserver.add_rpc_handler(RPC(get_patched_freqtradebot(mocker, default_conf))) + apiserver.start_api() assert server_mock.call_count == 1 assert apiserver._config == default_conf apiserver.start_api() @@ -406,6 +408,7 @@ def test_api_cleanup(default_conf, mocker, caplog): apiserver = ApiServer(default_conf) apiserver.add_rpc_handler(RPC(get_patched_freqtradebot(mocker, default_conf))) + apiserver.start_api() apiserver.cleanup() assert apiserver._server.cleanup.call_count == 1