Support deleting locks via API

This commit is contained in:
Matthias
2021-03-01 19:50:39 +01:00
parent 3d65ba2dcb
commit 6640156ac7
5 changed files with 45 additions and 2 deletions

View File

@@ -418,6 +418,16 @@ def test_api_locks(botclient):
assert 'randreason' in (rc.json()['locks'][0]['reason'], rc.json()['locks'][1]['reason'])
assert 'deadbeef' in (rc.json()['locks'][0]['reason'], rc.json()['locks'][1]['reason'])
# Test deletions
rc = client_delete(client, f"{BASE_URI}/locks/1")
assert_response(rc)
assert rc.json()['lock_count'] == 1
rc = client_post(client, f"{BASE_URI}/locks/delete",
data='{"pair": "XRP/BTC"}')
assert_response(rc)
assert rc.json()['lock_count'] == 0
def test_api_show_config(botclient, mocker):
ftbot, client = botclient