'Tests that we don\'t log a warning on a 404 response when trying to
delete an allocation record.'

@mock.patch('nova.scheduler.client.report.SchedulerReportClient.delete')
@mock.patch('nova.scheduler.client.report.LOG')
def test_delete_allocation_for_instance_ignore_404(self, mock_log, mock_delete):

    mock_response = mock.MagicMock(status_code=404)
    try:
        mock_response.__nonzero__.return_value = False
    except AttributeError:
        mock_response.__bool__.return_value = False
    mock_delete.return_value = mock_response
    self.client.delete_allocation_for_instance(uuids.rp_uuid)
    mock_log.info.assert_not_called()
    mock_log.warning.assert_not_called()
