#NEWLINE# def _test_put_with_text_type_and_text( self , text_type ) : #NEWLINE# #INDENT# comment_text = '`Test` **diff** comment' #NEWLINE# ( url , mimetype , data , reply_comment , objs ) = self . setup_basic_put_test ( self . user , False , None , True ) #NEWLINE# data [ 'text_type' ] = text_type #NEWLINE# data [ 'text' ] = comment_text #NEWLINE# rsp = self . api_put ( url , reply_comment , expected_mimetype = mimetype ) #NEWLINE# self . assertEqual ( rsp [ 'stat' ] , 'ok' ) #NEWLINE# self . assertIn ( self . resource . item_result_key , rsp ) #NEWLINE# comment_rsp = rsp [ self . resource . item_result_key ] #NEWLINE# self . assertEqual ( comment_rsp [ 'text' ] , comment_text ) #NEWLINE# self . assertEqual ( comment_rsp [ 'text_type' ] , text_type ) #NEWLINE# comment = self . resource . model . objects . get ( pk = comment_rsp [ 'id' ] ) #NEWLINE# self . compare_item ( comment_rsp , comment )