ref: Fix unused args in tests (#4156)

Fix unused args in tests
This commit is contained in:
Christophe Bornet 2024-10-15 17:05:19 +02:00 committed by GitHub
commit 3c6ec0cf9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 94 additions and 63 deletions

View file

@ -13,7 +13,8 @@ async def api_key(client, logged_in_headers, active_user):
return response.json()
async def test_get_api_keys(client: AsyncClient, logged_in_headers, api_key):
@pytest.mark.usefixtures("api_key")
async def test_get_api_keys(client: AsyncClient, logged_in_headers):
response = await client.get("api/v1/api_key/", headers=logged_in_headers)
assert response.status_code == 200, response.text
data = response.json()
@ -34,7 +35,8 @@ async def test_create_api_key(client: AsyncClient, logged_in_headers):
assert "**" not in data["api_key"]
async def test_delete_api_key(client, logged_in_headers, active_user, api_key):
@pytest.mark.usefixtures("active_user")
async def test_delete_api_key(client, logged_in_headers, api_key):
api_key_id = api_key["id"]
response = await client.delete(f"api/v1/api_key/{api_key_id}", headers=logged_in_headers)
assert response.status_code == 200