'A RateMeasurer correctly reports the rate when enough
samples have been collected.'

def test_rate_is_correct_when_enough_samples(self):

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