mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-22 12:11:26 +00:00
test(ssh): remove rest user getting tests (they are covered by users tests
This commit is contained in:
parent
16c2598e9b
commit
42d96bcd6d
|
@ -95,21 +95,6 @@ def some_users(mocker, datadir):
|
||||||
## /ssh/keys/{user} ######################################################
|
## /ssh/keys/{user} ######################################################
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("user", [1, 2, 3])
|
|
||||||
def test_get_user_key(authorized_client, some_users, user):
|
|
||||||
response = authorized_client.get(f"/services/ssh/keys/user{user}")
|
|
||||||
assert response.status_code == 200
|
|
||||||
if user == 1:
|
|
||||||
assert response.json() == ["ssh-rsa KEY user1@pc"]
|
|
||||||
else:
|
|
||||||
assert response.json() == []
|
|
||||||
|
|
||||||
|
|
||||||
def test_get_keys_of_nonexistent_user(authorized_client, some_users):
|
|
||||||
response = authorized_client.get("/services/ssh/keys/user4")
|
|
||||||
assert response.status_code == 404
|
|
||||||
|
|
||||||
|
|
||||||
def test_get_keys_of_undefined_users(authorized_client, undefined_settings):
|
def test_get_keys_of_undefined_users(authorized_client, undefined_settings):
|
||||||
response = authorized_client.get("/services/ssh/keys/user1")
|
response = authorized_client.get("/services/ssh/keys/user1")
|
||||||
assert response.status_code == 404
|
assert response.status_code == 404
|
||||||
|
|
Loading…
Reference in a new issue