#NEWLINE# def _test_put_with_text_types( self , text_type_field , text_type_value , expected_body_top_text_type , expected_body_bottom_text_type ) : #NEWLINE# #INDENT# body_top = '`This` is **body_top**' #NEWLINE# body_bottom = '`This` is **body_bottom**' #NEWLINE# ( url , mimetype , data , review , objs ) = self . setup_basic_put_test ( self . user , False , None , True ) #NEWLINE# data . update ( { #NEWLINE# #INDENT# 'body_top' : body_top , #NEWLINE# 'body_bottom' : body_bottom , #NEWLINE# text_type_field : text_type_value , #NEWLINE# #UNINDENT# } ) #NEWLINE# rsp = self . api_put ( url , data , expected_mimetype = mimetype ) #NEWLINE# self . assertEqual ( rsp [ 'stat' ] , 'ok' ) #NEWLINE# review_rsp = rsp [ self . resource . item_result_key ] #NEWLINE# self . assertEqual ( review_rsp [ 'body_top' ] , body_top ) #NEWLINE# self . assertEqual ( review_rsp [ 'body_bottom' ] , body_bottom ) #NEWLINE# self . assertEqual ( review_rsp [ 'body_top_text_type' ] , expected_body_top_text_type ) #NEWLINE# self . assertEqual ( review_rsp [ 'body_bottom_text_type' ] , expected_body_bottom_text_type ) #NEWLINE# self . compare_item ( review_rsp , self . resource . model . objects . get ( pk = review_rsp [ 'id' ] ) )