From e6b0d732d55df7c5ad03eb5a74cd018dda8b1513 Mon Sep 17 00:00:00 2001 From: Veiko Aasa Date: Thu, 2 Jan 2020 19:04:38 +0200 Subject: [PATCH] users: Fix test fixture that disables console login restrictions Fixes pytest StopIteration errors when console login restrictions are disabled before running tests. Signed-off-by: Veiko Aasa --- plinth/modules/users/tests/test_actions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plinth/modules/users/tests/test_actions.py b/plinth/modules/users/tests/test_actions.py index 24b441a2c..3d2a086c5 100644 --- a/plinth/modules/users/tests/test_actions.py +++ b/plinth/modules/users/tests/test_actions.py @@ -101,6 +101,8 @@ def fixture_disable_restricted_access(needs_root, load_cfg): security.set_restricted_access(False) yield security.set_restricted_access(True) + else: + yield @pytest.fixture(name='auto_cleanup_users_groups', autouse=True)