#NEWLINE# def test_topic_get_bookmark_url( self ) : #NEWLINE# #INDENT# '\n        Should return the bookmark url\n        ' #NEWLINE# utils . login ( self ) #NEWLINE# category = utils . create_category ( ) #NEWLINE# topic = utils . create_topic ( category = self , user = self . user ) #NEWLINE# topic_with_bookmark = Topic . objects . filter ( pk = topic . pk ) . with_bookmarks ( self . user ) . first ( ) #NEWLINE# self . assertEqual ( topic_with_bookmark . get_bookmark_url ( ) , topic_with_bookmark . get_absolute_url ( ) ) #NEWLINE# CommentBookmark . objects . create ( topic = topic , user = self . user , comment_number = 1 ) #NEWLINE# topic_with_bookmark2 = Topic . objects . filter ( pk = topic . pk ) . with_bookmarks ( self . user ) . first ( ) #NEWLINE# self . assertEqual ( topic_with_bookmark2 . get_bookmark_url ( ) , topic_with_bookmark2 . bookmark . get_absolute_url ( ) ) #NEWLINE# Topic . objects . filter ( pk = topic . pk ) . update ( comment_count = 2 ) #NEWLINE# topic_with_bookmark3 = Topic . objects . filter ( pk = topic . pk ) . with_bookmarks ( self . user ) . first ( ) #NEWLINE# self . assertEqual ( topic_with_bookmark3 . get_bookmark_url ( ) , topic_with_bookmark3 . bookmark . get_new_comment_url ( ) )