def test_use_sudo(self): self.flags(disable_rootwrap=True, group='workarounds') cmd = utils._get_root_helper() self.assertEqual('sudo', cmd)
def test_use_rootwrap(self): self.flags(disable_rootwrap=False, group='workarounds') self.flags(rootwrap_config='foo') cmd = utils._get_root_helper() self.assertEqual('sudo patron-rootwrap foo', cmd)