def METHOD_NAME(self, metrics):
    limiter = RateLimiter(
        storage.MemoryStorage(),
        "1 per minute",
        identifiers=["foo"],
        metrics=metrics,
    )
    def raiser(*args, **kwargs):
        raise redis.ConnectionError()
    limiter._window = pretend.stub(hit=raiser, test=raiser, get_window_stats=raiser)
    assert limiter.test("foo")
    assert limiter.hit("foo")
    assert limiter.resets_in("foo") is None
    assert metrics.increment.calls == [
        pretend.call("warehouse.ratelimiter.error", tags=["call:test"]),
        pretend.call("warehouse.ratelimiter.error", tags=["call:hit"]),
        pretend.call("warehouse.ratelimiter.error", tags=["call:resets_in"]),
    ]