From b221e605751ce140215bf7bf8963f1d5d4803dcc Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Tue, 30 Jan 2018 11:59:36 +0530 Subject: [PATCH] Mark test_is_package_manager_busy as requires root Signed-off-by: Joseph Nuthalapati --- plinth/tests/test_actions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plinth/tests/test_actions.py b/plinth/tests/test_actions.py index f97759a22..08e31d171 100644 --- a/plinth/tests/test_actions.py +++ b/plinth/tests/test_actions.py @@ -28,6 +28,8 @@ from plinth import cfg from plinth.actions import run, superuser_run from plinth.errors import ActionError +euid = os.geteuid() + class TestActions(unittest.TestCase): """Verify that privileged actions perform as expected. @@ -148,6 +150,7 @@ class TestActions(unittest.TestCase): output = output.rstrip('\n') self.assertEqual(options, output) + @unittest.skipUnless(euid == 0, 'Needs to be root') def test_is_package_manager_busy(self): """Test the behavior of `is-package-manager-busy` in both locked and unlocked states of the dpkg lock file."""