def METHOD_NAME(self, mock_get):
    shard = models.Shard.objects.create(name="test_scrape_shard")
    service = models.Service.objects.create(name="test_scrape_service")
    farm = models.Farm.objects.create(name="test_scrape_farm")
    farm.host_set.create(name="example.com")
    project = models.Project.objects.create(
        name="test_scrape_project", service=service, shard=shard, farm=farm
    )
    # Uses the scrape target as the key, and the POST body that should
    # result in that URL
    exporters = {
        "http://example.com:8000/metrics": {
            "target": "#exporterresult",
            "job": "foo",
            "port": 8000,
            "scheme": "http",
        },
        "https://example.com:8000/foo": {
            "target": "#exporterresult",
            "job": "foo",
            "port": 8000,
            "path": "/foo",
            "scheme": "https",
        },
    }
    for url, body in exporters.items():
        response = requests.Response()
        response.url = url
        response.status_code = 200
        mock_get.return_value = response
        # For each POST body, check to see that we generate and attempt to
        # scrape the correct URL
        response = self.client.post(reverse("exporter-scrape", kwargs={"pk": project.pk}), body)
        self.assertRoute(response, views.ExporterScrape, 200)
        self.assertEqual(mock_get.call_args[0][0], url)