def test_landscape_user(self):
"""
The watchdog *can* be run as the 'landscape' user.
"""
self.fake_pwd.addUser(
"landscape", None, os.getuid(), None, None, None, None)
reactor = FakeReactor()
with mock.patch("landscape.client.watchdog.pwd", new=self.fake_pwd):
run(["--log-dir", self.makeDir()], reactor=reactor)
self.assertTrue(reactor.running)
评论列表
文章目录