def test_create_subset(sample_collection, samples, make_optimized_select_view):
    """Test converting batch into sample collection"""

    sample_ids = tuple((sample.id for sample in samples))

    batch = fomi.SampleIdBatch(*sample_ids)

    #####
    result = batch.create_subset(sample_collection)
    #####

    make_optimized_select_view.assert_called_once_with(
        sample_collection, sample_ids
    )

    assert result == make_optimized_select_view.return_value
Test converting batch into sample collection
tests/unittests/map/test_id_batch.py