mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
Change statuscode to 202
This commit is contained in:
@@ -371,7 +371,7 @@ def pairlists_evaluate(payload: PairListsPayload, background_tasks: BackgroundTa
|
||||
@router.get('/pairlists/evaluate', response_model=WhitelistResponse, tags=['pairlists'])
|
||||
def pairlists_evaluate_get():
|
||||
if ApiBG.pairlist_running:
|
||||
raise HTTPException(status_code=400, detail='Pairlist evaluation is currently running.')
|
||||
raise HTTPException(status_code=202, detail='Pairlist evaluation is currently running.')
|
||||
|
||||
if not ApiBG.pairlist_result:
|
||||
raise HTTPException(status_code=400, detail='Pairlist evaluation not started yet.')
|
||||
|
||||
@@ -1650,7 +1650,7 @@ def test_api_pairlists_evaluate(botclient, tmpdir):
|
||||
|
||||
ApiBG.pairlist_running = True
|
||||
rc = client_get(client, f"{BASE_URI}/pairlists/evaluate")
|
||||
assert_response(rc, 400)
|
||||
assert_response(rc, 202)
|
||||
assert rc.json()['detail'] == 'Pairlist evaluation is currently running.'
|
||||
|
||||
body = {
|
||||
|
||||
Reference in New Issue
Block a user