def test_gentoo_is_openrc(self): with mock.patch('os.path.isdir', return_value=True): self.assertEqual(gentoo.is_openrc(), True) with mock.patch('os.path.isdir', return_value=False): self.assertEqual(gentoo.is_openrc(), False)