#NEWLINE# def test_links( self ) : #NEWLINE# #INDENT# template = '{% paginate objects %}{% show_pages %}' #NEWLINE# for page_number in range ( 1 , 6 ) : #NEWLINE# #INDENT# tree = self . render ( self . request ( page = page_number ) , template ) #NEWLINE# links = tree . findall ( './/a' ) #NEWLINE# expected = ( 5 if ( ( page_number == 1 ) or ( page_number == 5 ) ) else 6 ) #NEWLINE# self . assertEqual ( expected , len ( links ) )