mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
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:
parent
5399efde73
commit
d32d02ecb5
@ -53,7 +53,7 @@ def gitweb_patch():
|
|||||||
with patch('plinth.modules.gitweb.get_repo_list') as get_repo_list, \
|
with patch('plinth.modules.gitweb.get_repo_list') as get_repo_list, \
|
||||||
patch('plinth.app.App.get') as app_get, \
|
patch('plinth.app.App.get') as app_get, \
|
||||||
patch(f'{privileged}.create_repo'), \
|
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}.repo_info') as repo_info, \
|
||||||
patch(f'{privileged}.rename_repo'), \
|
patch(f'{privileged}.rename_repo'), \
|
||||||
patch(f'{privileged}.set_repo_description'), \
|
patch(f'{privileged}.set_repo_description'), \
|
||||||
|
|||||||
@ -72,9 +72,9 @@ def make_request(request, view, as_admin=True, **kwargs):
|
|||||||
request.user = admin_user if as_admin else user
|
request.user = admin_user if as_admin else user
|
||||||
|
|
||||||
with patch('plinth.modules.users.forms.is_user_admin',
|
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',
|
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'):
|
patch('plinth.modules.users.views.update_session_auth_hash'):
|
||||||
|
|
||||||
response = view(request, **kwargs)
|
response = view(request, **kwargs)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user