@mock.patch('cloudbaseinit.utils.windows.vfat.copy_from_vfat_drive')
    @mock.patch('cloudbaseinit.utils.windows.vfat.is_vfat_drive')
    def test_get_config_drive_from_vfat(self, mock_is_vfat_drive,
                                        mock_copy_from_vfat_drive):
        self.osutils.get_physical_disks.return_value = (
            mock.sentinel.drive1,
            mock.sentinel.drive2,
        )
        mock_is_vfat_drive.side_effect = (None, True)

        with testutils.LogSnatcher('cloudbaseinit.metadata.services.'
                                   'osconfigdrive.windows') as snatcher:
            response = self._config_manager._get_config_drive_from_vfat()

        self.assertTrue(response)
        self.osutils.get_physical_disks.assert_called_once_with()

        expected_is_vfat_calls = [
            mock.call(self.osutils, mock.sentinel.drive1),
            mock.call(self.osutils, mock.sentinel.drive2),
        ]
        self.assertEqual(expected_is_vfat_calls, mock_is_vfat_drive.mock_calls)
        mock_copy_from_vfat_drive.assert_called_once_with(
            self.osutils,
            mock.sentinel.drive2,
            self._config_manager.target_path)

        expected_logging = [
            'Config Drive found on disk %r' % mock.sentinel.drive2,
        ]
        self.assertEqual(expected_logging, snatcher.output)
dataset/ETHPy150Open openstack/cloudbase-init/cloudbaseinit/tests/metadata/services/osconfigdrive/test_windows.py/TestWindowsConfigDriveManager.test_get_config_drive_from_vfat/original