fix: better differentiation between UNAUTHORIZED and FORBIDDEN (#3139)

This commit is contained in:
Vlad Stan 2025-05-05 11:55:58 +03:00 committed by GitHub
parent 6a9089fd98
commit 3529f9152f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 39 additions and 45 deletions

View file

@ -7,7 +7,7 @@ from lnbits.settings import Settings
@pytest.mark.anyio
async def test_admin_get_settings_permission_denied(client, from_user):
response = await client.get(f"/admin/api/v1/settings?usr={from_user.id}")
assert response.status_code == 401
assert response.status_code == 403
@pytest.mark.anyio