test for deactivating super admin

blueprint_refactoring
Simon Pirkelmann 2022-01-31 23:25:47 +01:00
parent e0bbe02bc1
commit 0c7821cbe5
1 changed files with 6 additions and 0 deletions

View File

@ -210,6 +210,12 @@ def test_activate_deactivate_user(temp_user, client_authenticated):
assert user is not None
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):
# first we test deleting a non-existing user