#NEWLINE# def _post_comment( self , data = None , parent = None ) : #NEWLINE# #INDENT# Comment = comments . get_model ( ) #NEWLINE# body = self . BASE_DATA . copy ( ) #NEWLINE# if data : #NEWLINE# #INDENT# body . update ( data ) #NEWLINE# #UNINDENT# url = comments . get_form_target ( ) #NEWLINE# args = [ Site . objects . all ( ) [ 0 ] ] #NEWLINE# kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ( parent is not None ) : #NEWLINE# #INDENT# kwargs [ 'parent' ] = str ( parent . pk ) #NEWLINE# body [ 'parent' ] = str ( parent . pk ) #NEWLINE# #UNINDENT# form = comments . get_form ( ) ( * args , ** kwargs ) #NEWLINE# body . update ( form . generate_security_data ( ) ) #NEWLINE# self . client . post ( url , body , follow = True ) #NEWLINE# return Comment . objects . order_by ( '-id' ) [ 0 ]