another testcase the fails similar to #847 (#892)

* another testcase the fails similar to #847

* proper fix

* revert to statuscode 401 and code improvements @calle

Co-authored-by: dni <dni.khr@gmail.com>
This commit is contained in:
dni ⚡ 2022-08-16 17:01:05 +02:00 committed by GitHub
parent 8956bdc954
commit 88ec440ea1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 8 deletions

View file

@ -45,9 +45,16 @@ async def test_get_wallet_adminkey(client, adminkey_headers_to):
assert "id" in result
# check POST /api/v1/payments: empty request
# check PUT /api/v1/wallet/newwallet: empty request where admin key is needed
@pytest.mark.asyncio
async def test_post_empty_request(client):
async def test_put_empty_request_expected_admin_keys(client):
response = await client.put("/api/v1/wallet/newwallet")
assert response.status_code == 401
# check POST /api/v1/payments: empty request where invoice key is needed
@pytest.mark.asyncio
async def test_post_empty_request_expected_invoice_keys(client):
response = await client.post("/api/v1/payments")
assert response.status_code == 401