From 68743012e400cde9e04a434e385eeceeded237c0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 4 Apr 2019 07:13:55 +0200 Subject: [PATCH] Patch api server for tests --- freqtrade/tests/conftest.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/freqtrade/tests/conftest.py b/freqtrade/tests/conftest.py index 0bff1d5e9..98563a374 100644 --- a/freqtrade/tests/conftest.py +++ b/freqtrade/tests/conftest.py @@ -134,6 +134,15 @@ def patch_coinmarketcap(mocker) -> None: ) +def patch_apiserver(mocker) -> None: + mocker.patch.multiple( + 'freqtrade.rpc.api_server.ApiServer', + run=MagicMock(), + register_rest_other=MagicMock(), + register_rest_rpc_urls=MagicMock(), + ) + + @pytest.fixture(scope="function") def default_conf(): """ Returns validated configuration suitable for most tests """