#NEWLINE# def test_set_messages_success( self ) : #NEWLINE# #INDENT# author = { #NEWLINE# #INDENT# 'name' : 'John Doe' , #NEWLINE# 'slug' : 'success-msg' , #NEWLINE# #UNINDENT# } #NEWLINE# add_url = reverse ( 'add_success_msg' ) #NEWLINE# req = self . client . post ( add_url , author ) #NEWLINE# self . assertIn ( ( ContactFormViewWithMsg . success_message % author ) , req . cookies [ 'messages' ] . value )