diff --git a/kallithea/tests/functional/test_admin_permissions.py b/kallithea/tests/functional/test_admin_permissions.py --- a/kallithea/tests/functional/test_admin_permissions.py +++ b/kallithea/tests/functional/test_admin_permissions.py @@ -29,7 +29,7 @@ class TestAdminPermissionsController(Tes response = self.app.post(url('edit_user_ips_update', id=default_user_id), params=dict(new_ip='0.0.0.0/24', - _authentication_token=self.authentication_token())) + _session_csrf_secret_token=self.session_csrf_secret_token())) invalidate_all_caches() response = self.app.get(url('admin_permissions_ips'), extra_environ={'REMOTE_ADDR': '0.0.0.1'}) @@ -43,7 +43,7 @@ class TestAdminPermissionsController(Tes response = self.app.post(url('edit_user_ips_update', id=default_user_id), params=dict(new_ip='0.0.1.0/24', - _authentication_token=self.authentication_token())) + _session_csrf_secret_token=self.session_csrf_secret_token())) invalidate_all_caches() response = self.app.get(url('admin_permissions_ips'), @@ -54,7 +54,7 @@ class TestAdminPermissionsController(Tes x = UserIpMap.query().filter_by(ip_addr='0.0.1.0/24').first() response = self.app.post(url('edit_user_ips_delete', id=default_user_id), params=dict(del_ip_id=x.ip_id, - _authentication_token=self.authentication_token())) + _session_csrf_secret_token=self.session_csrf_secret_token())) invalidate_all_caches() response = self.app.get(url('admin_permissions_ips'), @@ -65,7 +65,7 @@ class TestAdminPermissionsController(Tes x = UserIpMap.query().filter_by(ip_addr='0.0.0.0/24').first() response = self.app.post(url('edit_user_ips_delete', id=default_user_id), params=dict(del_ip_id=x.ip_id, - _authentication_token=self.authentication_token())) + _session_csrf_secret_token=self.session_csrf_secret_token())) invalidate_all_caches() response = self.app.get(url('admin_permissions_ips'), @@ -86,7 +86,7 @@ class TestAdminPermissionsController(Tes perm_new_member_1='repository.read', perm_new_member_name_1=user.username, perm_new_member_type_1='user', - _authentication_token=self.authentication_token()), + _session_csrf_secret_token=self.session_csrf_secret_token()), status=302) assert not response.location.endswith(url('edit_repo_perms_update', repo_name=HG_REPO)) @@ -97,7 +97,7 @@ class TestAdminPermissionsController(Tes params=dict( obj_type='user', user_id=user.user_id, - _authentication_token=self.authentication_token()), + _session_csrf_secret_token=self.session_csrf_secret_token()), status=302) assert response.location.endswith(url('login_home', came_from=url('edit_repo_perms_revoke', repo_name=HG_REPO))) @@ -111,7 +111,7 @@ class TestAdminPermissionsController(Tes perm_new_member_1='repository.read', perm_new_member_name_1=user.username, perm_new_member_type_1='user', - _authentication_token=self.authentication_token()), + _session_csrf_secret_token=self.session_csrf_secret_token()), status=302) assert response.location.endswith(url('edit_repo_perms_update', repo_name=HG_REPO)) @@ -121,6 +121,6 @@ class TestAdminPermissionsController(Tes params=dict( obj_type='user', user_id=user.user_id, - _authentication_token=self.authentication_token()), + _session_csrf_secret_token=self.session_csrf_secret_token()), status=200) assert not response.body