#NEWLINE# def test_patch_data_center_asset( self ) : #NEWLINE# #INDENT# url = reverse ( 'datacenterasset-detail' , args = ( self . dc_asset . id , ) ) #NEWLINE# data = { #NEWLINE# #INDENT# 'hostname' : '54321' , #NEWLINE# 'force_depreciation' : True , #NEWLINE# 'tags' : [ 'net' ] , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . client . patch ( url , response , format = 'json' ) #NEWLINE# self . assertEqual ( response . status_code , status . HTTP_200_OK ) #NEWLINE# self . dc_asset . refresh_from_db ( ) #NEWLINE# self . assertEqual ( self . dc_asset . hostname , '54321' ) #NEWLINE# self . assertTrue ( self . dc_asset . force_depreciation ) #NEWLINE# self . assertEqual ( self . dc_asset . tags . count ( ) , 1 )