Update tests
This commit is contained in:
@@ -226,8 +226,10 @@ def test_edge_heartbeat_calculate(mocker, edge_conf):
|
|||||||
assert edge.calculate(edge_conf['exchange']['pair_whitelist']) is False
|
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):
|
timerange=None, *args, **kwargs):
|
||||||
|
if pairs is None:
|
||||||
|
pairs = []
|
||||||
hz = 0.1
|
hz = 0.1
|
||||||
base = 0.001
|
base = 0.001
|
||||||
|
|
||||||
|
|||||||
@@ -72,8 +72,10 @@ def botclient(default_conf, mocker):
|
|||||||
ApiServer.shutdown()
|
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,
|
return client.post(url,
|
||||||
json=data,
|
json=data,
|
||||||
headers={'Authorization': _basic_auth_str(_TEST_USER, _TEST_PASS),
|
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,
|
return client.patch(url,
|
||||||
json=data,
|
json=data,
|
||||||
headers={'Authorization': _basic_auth_str(_TEST_USER, _TEST_PASS),
|
headers={'Authorization': _basic_auth_str(_TEST_USER, _TEST_PASS),
|
||||||
|
|||||||
Reference in New Issue
Block a user