Enhance restclient and add tests for new api methods

This commit is contained in:
Matthias
2020-09-11 20:31:02 +02:00
parent bb4993dc20
commit f82d39e1b0
4 changed files with 98 additions and 4 deletions

View File

@@ -818,6 +818,16 @@ def test_api_pair_candles(botclient, ohlcv_history):
timeframe = '5m'
amount = 2
# No pair
rc = client_get(client,
f"{BASE_URI}/pair_candles?limit={amount}&timeframe={timeframe}")
assert_response(rc, 400)
# No timeframe
rc = client_get(client,
f"{BASE_URI}/pair_candles?pair=XRP%2FBTC")
assert_response(rc, 400)
rc = client_get(client,
f"{BASE_URI}/pair_candles?limit={amount}&pair=XRP%2FBTC&timeframe={timeframe}")
assert_response(rc)