From 87d50243e29cba762c1642667653cf7d307f18ee Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 19 Apr 2024 07:25:41 +0200 Subject: [PATCH] Update tests --- tests/edge/test_edge.py | 4 +++- tests/rpc/test_rpc_apiserver.py | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/edge/test_edge.py b/tests/edge/test_edge.py index 4829dd035..53840b190 100644 --- a/tests/edge/test_edge.py +++ b/tests/edge/test_edge.py @@ -226,8 +226,10 @@ def test_edge_heartbeat_calculate(mocker, edge_conf): assert edge.calculate(edge_conf['exchange']['pair_whitelist']) is False -def mocked_load_data(datadir, pairs=[], timeframe='0m', +def mocked_load_data(datadir, pairs=None, timeframe='0m', timerange=None, *args, **kwargs): + if pairs is None: + pairs = [] hz = 0.1 base = 0.001 diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index 9e5c820c3..4024102fa 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -72,8 +72,10 @@ def botclient(default_conf, mocker): ApiServer.shutdown() -def client_post(client: TestClient, url, data={}): +def client_post(client: TestClient, url, data=None): + if data is None: + data = {} return client.post(url, json=data, headers={'Authorization': _basic_auth_str(_TEST_USER, _TEST_PASS), @@ -82,8 +84,10 @@ def client_post(client: TestClient, url, data={}): }) -def client_patch(client: TestClient, url, data={}): +def client_patch(client: TestClient, url, data=None): + if data is None: + data = {} return client.patch(url, json=data, headers={'Authorization': _basic_auth_str(_TEST_USER, _TEST_PASS),