@mock.patch('cloudbaseinit.metadata.services.osconfigdrive.windows.'
                'WindowsConfigDriveManager.'
                '_extract_iso_from_devices')
    def _test_get_config_drive_from_partition(self,
                                              mock_extract_iso_from_devices,
                                              found=True):
        paths = [mock.Mock() for _ in range(3)]
        self.osutils.get_physical_disks.return_value = paths
        disks = list(map(self.conf_module.disk.Disk, paths))
        mock_extract_iso_from_devices.side_effect = [False, found, found]
        idx = int(found) - 3
        extract_calls = [mock.call(disk.partitions())
                         for disk in disks[:idx]]

        response = self._config_manager._get_config_drive_from_partition()
        self.osutils.get_physical_disks.assert_called_once_with()
        mock_extract_iso_from_devices.assert_has_calls(extract_calls)
        self.assertEqual(found, response)
dataset/ETHPy150Open openstack/cloudbase-init/cloudbaseinit/tests/metadata/services/osconfigdrive/test_windows.py/TestWindowsConfigDriveManager._test_get_config_drive_from_partition/swapped operands of `-`