#NEWLINE# def test_drilldowns( self ) : #NEWLINE# #INDENT# self . _create_posts ( ) #NEWLINE# response = self . client . get ( reverse ( 'admin2:blog_post_index' ) ) #NEWLINE# self . assertContains ( response , '<a href="?year=2012">2012</a>' ) #NEWLINE# self . assertContains ( response , '<tr>' , 5 ) #NEWLINE# response = self . client . get ( ( '%s?%s' % ( reverse ( 'admin2:blog_post_index' ) , 'year=2012' ) ) ) #NEWLINE# self . assertContains ( response , '<a href="?year=2012&month=05">May 2012</a>' ) #NEWLINE# self . assertContains ( response , 'All dates' ) #NEWLINE# self . assertContains ( response , '<tr>' , 4 ) #NEWLINE# response = self . client . get ( ( '%s?%s' % ( reverse ( 'admin2:blog_post_index' ) , 'year=2012&month=5' ) ) ) #NEWLINE# self . assertContains ( response , '<tr>' , 2 ) #NEWLINE# self . assertContains ( response , '<a href="?year=2012&month=05&day=20">May 20</a>' ) #NEWLINE# self . assertContains ( response , '<a href="?year=2012">' ) #NEWLINE# response = self . client . get ( ( '%s?%s' % ( reverse ( 'admin2:blog_post_index' ) , 'year=2012&month=05&day=20' ) ) ) #NEWLINE# self . assertContains ( response , '<tr>' , 1 ) #NEWLINE# self . assertContains ( response , '<a href="?year=2012&month=05&day=20">May 20</a>' ) #NEWLINE# self . assertContains ( response , '<li class="active">' ) #NEWLINE# self . assertContains ( response , 'May 2012' )