test for deactivating super admin

This commit is contained in:
Simon Pirkelmann 2022-01-31 23:25:47 +01:00
parent e0bbe02bc1
commit 0c7821cbe5

View File

@ -210,6 +210,12 @@ def test_activate_deactivate_user(temp_user, client_authenticated):
assert user is not None assert user is not None
assert user.active assert user.active
# test deactivating super admin
response = client_authenticated.get(f"/admin_toggle_active/gandalf",
follow_redirects=True)
assert 'Super-Admins können nicht deaktiviert werden!' \
in response.data.decode()
def test_delete_admin(temp_user, client_authenticated): def test_delete_admin(temp_user, client_authenticated):
# first we test deleting a non-existing user # first we test deleting a non-existing user