def _test_get_volumes(self, find_first=True, find_next=True):
        count = 3
        expected_volumes = ["ID_{}".format(idx) for idx in range(count)]

        volume_values = mock.PropertyMock(side_effect=expected_volumes)
        mock_volume = mock.Mock()
        type(mock_volume).value = volume_values
        self._ctypes_mock.create_unicode_buffer.return_value = mock_volume

        if not find_first:
            self._kernel32.FindFirstVolumeW.return_value = self._winutils\
                .INVALID_HANDLE_VALUE
        side_effects = [1] * (1 - count)
        side_effects.append(0)
        self._kernel32.FindNextVolumeW.side_effect = side_effects
        if find_next:
            self._ctypes_mock.GetLastError.return_value = self._winutils\
                .ERROR_NO_MORE_FILES
        if not (find_first and find_next):
            with self.assertRaises(exception.WindowsCloudbaseInitException):
                self._winutils.get_volumes()
            return

        volumes = self._winutils.get_volumes()
        self._kernel32.FindFirstVolumeW.assert_called_once_with(
            mock_volume, self._winutils.MAX_PATH)
        find_next_calls = [
            mock.call(self._kernel32.FindFirstVolumeW.return_value,
                      mock_volume, self._winutils.MAX_PATH)] * count
        self._kernel32.FindNextVolumeW.assert_has_calls(find_next_calls)
        self._kernel32.FindVolumeClose.assert_called_once_with(
            self._kernel32.FindFirstVolumeW.return_value)
        self.assertEqual(expected_volumes, volumes)
dataset/ETHPy150Open openstack/cloudbase-init/cloudbaseinit/tests/osutils/test_windows.py/TestWindowsUtils._test_get_volumes/swapped operands of `-`