Code Monkey home page Code Monkey logo

Comments (1)

jsocol avatar jsocol commented on May 28, 2024

Hi @sobolevn—the RatelimitMixin has actually been gone for a while, since #170, and originally released in v3.0.0.

The RatelimitMixin approach was never as powerful and was more fragile than the decorator approach, so I'm not too eager to return it. My general suggestion for tests would be to flip the RATELIMIT_ENABLE setting to False and not worry too much about it.

I'd recommend against tests like the last example: that is really testing django_ratelimit and not your own code. Removing tests of library functionality and relying on the library's tests will help keep the test suite quick.

Another option might be to write your own version of the mixin. There are a few tools—the decorator as well as is_ratelimited and get_usage in django_ratelimit.core—that are there exactly for this reason: to enable users to write their own code around the library when the library doesn't support their use case.

from django-ratelimit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.