fastapi-limiter icon indicating copy to clipboard operation
fastapi-limiter copied to clipboard

hashable & equalable

Open tkrtmy opened this issue 2 years ago • 1 comments

When writing unit tests, I'd like to use app.dependency_overrides to replace RateLimiter with a stub.

pseudo code

def test_hoge():
  app: FastAPI
...
  app.dependency_overrides[RateLimiter(times=60, minutes=1)] = lambda: True

related to:

  • https://github.com/long2ice/fastapi-limiter/issues/27

tkrtmy avatar Jan 05 '24 09:01 tkrtmy

@long2ice I would like you to confirm this change 🙏 And I hope you will release a newer version.

tkrtmy avatar Jan 08 '24 05:01 tkrtmy