def METHOD_NAME(self):
    """Test filtering results by product."""
    today = date.today()
    # Create products and associated wiki metrics.
    p1 = ProductFactory()
    p2 = ProductFactory()
    # Create 3 for each product:
    for i in range(3):
        for p in [p1, p2]:
            WikiMetricFactory(date=today - timedelta(days=i), product=p)
    # Create one more for p2.
    WikiMetricFactory(date=today - timedelta(days=4), product=p2)
    # Call and verify the API for product=p1.
    response = self.client.get(
        urlparams(reverse("api.wikimetric_list"), format="json", product=p1.slug)
    )
    self.assertEqual(200, response.status_code)
    results = json.loads(response.content)["results"]
    self.assertEqual(3, len(results))
    # Call and verify the API for product=p1.
    response = self.client.get(
        urlparams(reverse("api.wikimetric_list"), format="json", product=p2.slug)
    )
    self.assertEqual(200, response.status_code)
    results = json.loads(response.content)["results"]
    self.assertEqual(4, len(results))