Add /pairlists endpoint to api

This commit is contained in:
Matthias
2023-04-19 18:35:52 +02:00
parent f1e03a6873
commit 2df80fc49a
3 changed files with 40 additions and 6 deletions

View File

@@ -1580,6 +1580,22 @@ def test_api_freqaimodels(botclient, tmpdir, mocker):
]}
def test_api_pairlists(botclient, tmpdir, mocker):
ftbot, client = botclient
ftbot.config['user_data_dir'] = Path(tmpdir)
rc = client_get(client, f"{BASE_URI}/pairlists")
assert_response(rc)
response = rc.json()
assert isinstance(response['pairlists'], list)
assert len(response['pairlists']) > 0
assert len([r for r in response['pairlists'] if r['name'] == 'AgeFilter']) == 1
assert len([r for r in response['pairlists'] if r['name'] == 'VolumePairList']) == 1
assert len([r for r in response['pairlists'] if r['name'] == 'StaticPairList']) == 1
def test_list_available_pairs(botclient):
ftbot, client = botclient