code: def test_send(mocker, tmp_path):
      mock_post = mocker.patch("requests.post")
  
      import requests
  
      url = "https://analytics.dvc.org"
      report = {"name": "dummy report"}
      report_file = tmp_path / "report"
  
      report_file.write_text(json.dumps(report))
      mock_post.side_effect = requests.exceptions.RequestException
  
      analytics.send(str(report_file))
      assert mock_post.called
      assert mock_post.call_args[0][0] == url
      assert not report_file.exists()
  
file_path: dvc/tests/unit/test_analytics.py
imports: import json
  import platform
  import pytest
  from voluptuous import Any, Schema
  from dvc import analytics
  from dvc.cli import parse_args
label_desc: Use image node_id 4 for calling a global function with example usage: test_send(mocker, tmp_path) without return types