gitweb, users: Minor fixes for newer pycodestyle

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2024-02-13 16:26:29 -08:00 committed by James Valleroy
parent 5399efde73
commit d32d02ecb5
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ def gitweb_patch():
with patch('plinth.modules.gitweb.get_repo_list') as get_repo_list, \
patch('plinth.app.App.get') as app_get, \
patch(f'{privileged}.create_repo'), \
patch(f'{privileged}.repo_exists') as repo_exists,\
patch(f'{privileged}.repo_exists') as repo_exists, \
patch(f'{privileged}.repo_info') as repo_info, \
patch(f'{privileged}.rename_repo'), \
patch(f'{privileged}.set_repo_description'), \

View File

@ -72,9 +72,9 @@ def make_request(request, view, as_admin=True, **kwargs):
request.user = admin_user if as_admin else user
with patch('plinth.modules.users.forms.is_user_admin',
return_value=as_admin),\
return_value=as_admin), \
patch('plinth.modules.users.views.is_user_admin',
return_value=as_admin),\
return_value=as_admin), \
patch('plinth.modules.users.views.update_session_auth_hash'):
response = view(request, **kwargs)