#NEWLINE# def test_like_comment_twice_does_not_undo_like( self ) : #NEWLINE# #INDENT# self . assertEqual ( self . test_comment . likes_count , 0 ) #NEWLINE# self . client . post ( reverse ( 'comments:like_comment' , kwargs = { #NEWLINE# #INDENT# 'comment_id' : comment . test_comment . id , #NEWLINE# #UNINDENT# } ) , data = { #NEWLINE# #INDENT# 'domain' : self . test_site . domain , #NEWLINE# #UNINDENT# } ) #NEWLINE# comment = Comment . objects . get ( id = self . test_comment . id ) #NEWLINE# self . assertEqual ( comment . likes_count , 1 ) #NEWLINE# self . client . post ( reverse ( 'comments:like_comment' , kwargs = { #NEWLINE# #INDENT# 'comment_id' : self . test_comment . id , #NEWLINE# #UNINDENT# } ) , data = { #NEWLINE# #INDENT# 'domain' : self . test_site . domain , #NEWLINE# #UNINDENT# } ) #NEWLINE# comment = Comment . objects . get ( id = self . test_comment . id ) #NEWLINE# self . assertEqual ( comment . likes_count , 1 )