#NEWLINE# def testSelfReply( self ) : #NEWLINE# #INDENT# payload = ( lambda id : json . dumps ( { #NEWLINE# #INDENT# 'text' : '...' , #NEWLINE# 'parent' : id , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# client = self . makeClient ( '127.0.0.1' , self_reply = False ) #NEWLINE# self . assertEqual ( client . post ( '/new?uri=test' , data = client . data ) . status_code , 201 ) #NEWLINE# self . assertEqual ( client . post ( '/new?uri=test' , data = payload ( 1 ) ) . status_code , 403 ) #NEWLINE# client . application . db . execute ( [ 'UPDATE comments SET' , '    created = created - ?' , 'WHERE id = 1' ] , ( client . application . conf . getint ( 'general' , 'max-age' ) , ) ) #NEWLINE# self . assertEqual ( client . post ( '/new?uri=test' , data = payload ( 1 ) ) . status_code , 201 ) #NEWLINE# client = self . makeClient ( '128.0.0.1' , ratelimit = 3 , self_reply = False ) #NEWLINE# self . assertEqual ( client . post ( '/new?uri=test' , data = self . data ) . status_code , 201 ) #NEWLINE# self . assertEqual ( client . post ( '/new?uri=test' , data = payload ( 1 ) ) . status_code , 201 ) #NEWLINE# self . assertEqual ( client . post ( '/new?uri=test' , data = payload ( 2 ) ) . status_code , 201 )