mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-02-03 06:36:39 +00:00
test(ssh): get root key when none
This commit is contained in:
parent
7f1fcd66e3
commit
cf2935938d
|
@ -347,6 +347,10 @@ def test_graphql_get_root_key(authorized_client, some_users):
|
|||
assert api_rootkeys(authorized_client) == ["ssh-ed25519 KEY test@pc"]
|
||||
|
||||
|
||||
def test_graphql_get_root_key_when_none(authorized_client, no_rootkeys):
|
||||
assert api_rootkeys(authorized_client) == []
|
||||
|
||||
|
||||
def test_graphql_add_root_ssh_key(authorized_client, no_rootkeys):
|
||||
output = api_add_ssh_key(authorized_client, "root", "ssh-rsa KEY test_key@pc")
|
||||
|
||||
|
|
|
@ -95,12 +95,6 @@ def some_users(mocker, datadir):
|
|||
## /ssh/keys/{user} ######################################################
|
||||
|
||||
|
||||
def test_get_root_key_when_none(authorized_client, ssh_on):
|
||||
response = authorized_client.get("/services/ssh/keys/root")
|
||||
assert response.status_code == 200
|
||||
assert response.json() == []
|
||||
|
||||
|
||||
def test_delete_root_key(authorized_client, root_and_admin_have_keys):
|
||||
response = authorized_client.delete(
|
||||
"/services/ssh/keys/root", json={"public_key": "ssh-ed25519 KEY test@pc"}
|
||||
|
|
Loading…
Reference in a new issue