#NEWLINE# def test_list_one_page_response_paginated( self ) : #NEWLINE# #INDENT# id_value = 1 #NEWLINE# mock_response = mock . Mock ( ) #NEWLINE# mock_response . json . side_effect = [ [ { #NEWLINE# #INDENT# 'id' : id_value , #NEWLINE# #UNINDENT# } ] , [ ] ] #NEWLINE# self . session . get . return_value = mock_response #NEWLINE# results = list ( self . sot . list ( self . session , paginated = True ) ) #NEWLINE# self . assertEqual ( 1 , len ( results ) ) #NEWLINE# self . session . get . call_args_list [ 0 ] [ 1 ] [ 'params' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . session . get . call_args_list [ 1 ] [ 1 ] [ 'params' ] = { #NEWLINE# #INDENT# 'marker' : id_value , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( id_value , results [ 0 ] . id ) #NEWLINE# self . assertIsInstance ( results [ 0 ] , self . test_class )