From b01ac54dd344c9c4c6878bac369abee61b3bfde7 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 19 Aug 2019 19:37:14 -0700 Subject: [PATCH] users: Don't delete 'admin' group when running unit tests Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/modules/users/tests/test_actions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plinth/modules/users/tests/test_actions.py b/plinth/modules/users/tests/test_actions.py index c4f360b4b..72dda8cc8 100644 --- a/plinth/modules/users/tests/test_actions.py +++ b/plinth/modules/users/tests/test_actions.py @@ -132,7 +132,8 @@ def _create_user(username=None, groups=None): if groups: for group in groups: _call_action(['add-user-to-group', username, group]) - _cleanup_groups.add(group) + if group != 'admin': + _cleanup_groups.add(group) _cleanup_users.add(username) return username, password