#NEWLINE# def test_archive_view( self ) : #NEWLINE# #INDENT# res = self . client . get ( '/dates/books/' ) #NEWLINE# self . assertEqual ( res . status_code , 200 ) #NEWLINE# self . assertEqual ( list ( res . context [ 'date_list' ] ) , list ( Book . objects . dates ( 'pubdate' , 'year' , 'DESC' ) ) ) #NEWLINE# self . assertEqual ( list ( res . context [ 'latest' ] ) , list ( Book . objects . all ( ) ) ) #NEWLINE# self . assertTemplateUsed ( res , 'generic_views/book_archive.html' )