final
This commit is contained in:
@@ -42,7 +42,7 @@ async def test_create_user(client, email, password, expected_status, global_emai
|
|||||||
(True, 200)
|
(True, 200)
|
||||||
])
|
])
|
||||||
async def test_is_admin(client, monkeypatch, global_email, is_admin, expected_status):
|
async def test_is_admin(client, monkeypatch, global_email, is_admin, expected_status):
|
||||||
"""Проверка: Прав пользователя"""
|
"""Проверка: Прав пользователя + обновление"""
|
||||||
|
|
||||||
|
|
||||||
class FakePerm:
|
class FakePerm:
|
||||||
@@ -71,7 +71,11 @@ async def test_is_admin(client, monkeypatch, global_email, is_admin, expected_st
|
|||||||
response = await client.put(
|
response = await client.put(
|
||||||
f"/user_update/{global_email}",
|
f"/user_update/{global_email}",
|
||||||
headers={"Authorization": "Bearer faketoken"},
|
headers={"Authorization": "Bearer faketoken"},
|
||||||
json={"can_edit": True},
|
json={"can_edit": True,
|
||||||
|
"can_delete": True,
|
||||||
|
"can_view": True,
|
||||||
|
"description": "1112322"
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
assert response.status_code == expected_status
|
assert response.status_code == expected_status
|
||||||
|
|||||||
Reference in New Issue
Block a user