def METHOD_NAME(
    self, mock_vagrant_libvirt, mock_vagrant_virt_box
):
    for provider_name, provider_mock in (
            ('libvirt', mock_vagrant_libvirt),
            ('virtualbox', mock_vagrant_virt_box)
    ):
        vagrant_config = Mock()
        vagrant_config.get_provider = Mock(
            return_value=provider_name
        )
        self.xml_state.get_build_type_vagrant_config_section = Mock(
            return_value=vagrant_config
        )
        DiskFormat.new(
            'vagrant', self.xml_state, 'root_dir', 'target_dir'
        )
        provider_mock.assert_called_once_with(
            self.xml_state, 'root_dir', 'target_dir',
            {'vagrantconfig': vagrant_config}
        )