Commit 9a953a3f authored by Martín Ferrari's avatar Martín Ferrari

Test get_run_as

parent ce5c8fc3
......@@ -15,7 +15,13 @@ class TestConfigure(unittest.TestCase):
self.assertRaises(AttributeError, setattr, nemu.config,
'run_as', 'foobarbaz') # hope nobody has this user!
self.assertRaises(AttributeError, setattr, nemu.config,
'run_as', -1)
'run_as', 65536)
try:
pwd.getpwnam('nobody')
nemu.config.run_as('nobody')
self.assertEquals(nemu.config.run_as, 'nobody')
except:
pass
class TestGlobal(unittest.TestCase):
@test_util.skipUnless(os.getuid() == 0, "Test requires root privileges")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment