#NEWLINE# @ mock . patch . object ( fake . _FakeImageService , 'detail' , return_value = [ ] ) #NEWLINE# def test_post_backup_server( self , mock_method ) : #NEWLINE# #INDENT# response = self . _do_post ( ( 'servers/%s/action' % response . uuid ) , 'create-backup-req' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( 202 , response . status_code )