def setUp(self): runcmd_mock = mock.Mock(return_value="") self.RunCmdPatch = patch_object(utils, "RunCmd", runcmd_mock) self.RunCmdPatch.start() version_patch = patch_object(LXCHypervisor, "_LXC_MIN_VERSION_REQUIRED", LXCVersion("1.2.3")) self._LXC_MIN_VERSION_REQUIRED_Patch = version_patch self._LXC_MIN_VERSION_REQUIRED_Patch.start() self.hvc = LXCHypervisor