#NEWLINE# def test_list_with_page_1_special_case( self ) : #NEWLINE# #INDENT# 'Establish that the list function works even if the server gives\n        /foo/ as the relative link for page 1.\n        ' #NEWLINE# with client . test_mode as t : #NEWLINE# #INDENT# t . register_json ( '/foo/?page=2' , { #NEWLINE# #INDENT# 'count' : 2 , #NEWLINE# 'results' : [ { #NEWLINE# #INDENT# 'id' : 2 , #NEWLINE# 'name' : 'spam' , #NEWLINE# 'description' : 'eggs' , #NEWLINE# #UNINDENT# } ] , #NEWLINE# 'next' : None , #NEWLINE# 'previous' : '/foo/' , #NEWLINE# #UNINDENT# } ) #NEWLINE# result = self . res . list ( page = 2 ) #NEWLINE# self . assertEqual ( result [ 'previous' ] , 1 )