#NEWLINE# def test_send_message( self ) : #NEWLINE# #INDENT# 'Test submitting a message.' #NEWLINE# headers = { #NEWLINE# #INDENT# 'Content-Type' : 'application/x-www-form-urlencoded' , #NEWLINE# #UNINDENT# } #NEWLINE# params = urllib . urlencode ( { #NEWLINE# #INDENT# 'message' : self . message , #NEWLINE# #UNINDENT# } ) #NEWLINE# ( resp , content ) = self . http . request ( url_for ( '/send_message' ) , 'POST' , body = params , headers = params ) #NEWLINE# self . assertEquals ( 204 , resp . status ) #NEWLINE# found = False #NEWLINE# for i in range ( MAX_RETRY ) : #NEWLINE# #INDENT# time . sleep ( SLEEP_TIME ) #NEWLINE# content = self . fetch_messages ( ) #NEWLINE# if ( self . message in content ) : #NEWLINE# #INDENT# found = True #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# self . assertTrue ( found )