#NEWLINE# def test_put_with_changedesc( self ) : #NEWLINE# #INDENT# 'Testing the PUT review-requests/<id>/draft/ API\n        with a change description\n        ' #NEWLINE# changedesc = 'This is a test change description.' #NEWLINE# review_request = self . create_review_request ( submitter = self . user , publish = True ) #NEWLINE# rsp = self . api_post ( get_review_request_draft_url ( self ) , { #NEWLINE# #INDENT# 'changedescription' : changedesc , #NEWLINE# #UNINDENT# } , expected_mimetype = review_request_draft_item_mimetype ) #NEWLINE# self . assertEqual ( rsp [ 'stat' ] , 'ok' ) #NEWLINE# self . assertEqual ( rsp [ 'draft' ] [ 'changedescription' ] , changedesc ) #NEWLINE# draft = ReviewRequestDraft . objects . get ( pk = rsp [ 'draft' ] [ 'id' ] ) #NEWLINE# self . assertNotEqual ( draft . changedesc , None ) #NEWLINE# self . assertEqual ( draft . changedesc . text , changedesc )