parent
db2c12183c
commit
3c6ec0cf9e
13 changed files with 94 additions and 63 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue