#NEWLINE# def test_topic_detail_view( self ) : #NEWLINE# #INDENT# '\n        should display topic with comments\n        ' #NEWLINE# utils . login ( self ) #NEWLINE# category = utils . create_category ( ) #NEWLINE# topic = utils . create_topic ( category = category ) #NEWLINE# topic2 = utils . create_topic ( category = category ) #NEWLINE# comment1 = utils . create_comment ( topic = topic ) #NEWLINE# comment2 = utils . create_comment ( topic = topic ) #NEWLINE# utils . create_comment ( topic = topic2 ) #NEWLINE# response = self . client . get ( reverse ( 'spirit:topic:detail' , kwargs = { #NEWLINE# #INDENT# 'pk' : topic . pk , #NEWLINE# 'slug' : topic . slug , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# self . assertEqual ( response . context [ 'topic' ] , topic ) #NEWLINE# self . assertEqual ( list ( response . context [ 'comments' ] ) , [ comment1 , comment2 ] )