def METHOD_NAME(self) -> None:
    with mock.patch("shutil.which") as mock_which:
        mock_which.return_value = "/path/to/yum"
        self.assertTrue(has_yum())
        mock_which.return_value = None
        self.assertFalse(has_yum())