#NEWLINE# def test_collection_summaries_pagination_in_filled_gallery( self ) : #NEWLINE# #INDENT# with self . swap ( feconf , 'GALLERY_PAGE_SIZE' , 2 ) : #NEWLINE# #INDENT# found_col_ids = [ ] #NEWLINE# ( col_summaries , search_cursor ) = collection_services . get_collection_summaries_matching_query ( '' , None ) #NEWLINE# self . assertEqual ( len ( col_summaries ) , 2 ) #NEWLINE# self . assertIsNotNone ( search_cursor ) #NEWLINE# found_col_ids += self . _summaries_to_ids ( col_summaries ) #NEWLINE# ( col_summaries , search_cursor ) = collection_services . get_collection_summaries_matching_query ( '' , search_cursor ) #NEWLINE# self . assertEqual ( len ( col_summaries ) , 2 ) #NEWLINE# self . assertIsNotNone ( search_cursor ) #NEWLINE# found_col_ids += self . _summaries_to_ids ( col_summaries ) #NEWLINE# ( col_summaries , search_cursor ) = collection_services . get_collection_summaries_matching_query ( '' , search_cursor ) #NEWLINE# self . assertEqual ( len ( col_summaries ) , 1 ) #NEWLINE# self . assertIsNone ( search_cursor ) #NEWLINE# found_col_ids += self . _summaries_to_ids ( col_summaries ) #NEWLINE# self . assertEqual ( sorted ( found_col_ids ) , [ self . COL_ID_0 , self . COL_ID_1 , found_col_ids . COL_ID_2 , self . COL_ID_3 , self . COL_ID_4 ] )