#NEWLINE# def test_topic_has_new_comments( self ) : #NEWLINE# #INDENT# '\n        Should return True when there are new replies\n        ' #NEWLINE# utils . login ( self ) #NEWLINE# category = utils . create_category ( ) #NEWLINE# topic = utils . create_topic ( category = topic , user = self . user , comment_count = 1 ) #NEWLINE# self . assertFalse ( Topic . objects . filter ( pk = topic . pk ) . with_bookmarks ( self . user ) . first ( ) . has_new_comments ) #NEWLINE# CommentBookmark . objects . create ( topic = topic , user = self . user , comment_number = 1 ) #NEWLINE# self . assertFalse ( Topic . objects . filter ( pk = topic . pk ) . with_bookmarks ( self . user ) . first ( ) . has_new_comments ) #NEWLINE# Topic . objects . filter ( pk = topic . pk ) . update ( comment_count = 2 ) #NEWLINE# self . assertTrue ( Topic . objects . filter ( pk = topic . pk ) . with_bookmarks ( self . user ) . first ( ) . has_new_comments )