'Old samples should be discarded, meaning that only ``sample_size``
number of requests are considered for the rate, and when receiving
a new sample, the oldest one is discarded.'

def test_old_samples_are_not_considered(self):

    r = RateMeasurer()
    target_rate = 5
    self.increase_rate(r, (target_rate * 2), r.sample_size)
    self.increase_rate(r, target_rate, r.sample_size)
    self.assertEqual(target_rate, r.rate())
