mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
users: tests: Do not remove LDAP user when testing views
Fixes an issue where the LDAP user 'tester' was removed after testing test_views.py. It happened when there were two admin users present. Tested with both stable and testing containers that all the users module tests pass and a user 'tester' is not removed when two admin users exists. Signed-off-by: Veiko Aasa <veiko17@disroot.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
b36d4419c4
commit
ca0479aae2
@ -52,7 +52,8 @@ def module_patch():
|
||||
patch(f'{privileged}.get_group_users') as get_group_users, \
|
||||
patch('plinth.modules.ssh.privileged.set_keys'), \
|
||||
patch('plinth.modules.ssh.privileged.get_keys') as get_keys, \
|
||||
patch(f'{privileged}.get_user_groups') as get_user_groups:
|
||||
patch(f'{privileged}.get_user_groups') as get_user_groups, \
|
||||
patch(f'{privileged}.remove_user'):
|
||||
get_group_users.return_value = ['admin']
|
||||
get_keys.return_value = []
|
||||
get_user_groups.return_value = []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user