-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CustomScopedRateThrolle throttling class #2689
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FrankApiyo
force-pushed
the
fair-throttling-for-enketo-users
branch
2 times, most recently
from
August 30, 2024 10:52
a00ed0a
to
6ebb4cf
Compare
FrankApiyo
force-pushed
the
fair-throttling-for-enketo-users
branch
from
August 30, 2024 11:09
6ebb4cf
to
ecf661b
Compare
kelvin-muchiri
approved these changes
Aug 30, 2024
This will throttle anonymous enketo users more fairly
FrankApiyo
force-pushed
the
fair-throttling-for-enketo-users
branch
from
August 30, 2024 12:17
e7db607
to
73c8575
Compare
kelvin-muchiri
previously approved these changes
Aug 30, 2024
FrankApiyo
force-pushed
the
fair-throttling-for-enketo-users
branch
from
August 30, 2024 12:28
dba1170
to
11816da
Compare
FrankApiyo
force-pushed
the
fair-throttling-for-enketo-users
branch
from
August 30, 2024 12:29
11816da
to
880875e
Compare
kelvin-muchiri
previously approved these changes
Aug 30, 2024
onadata/libs/tests/test_throttle.py
Outdated
self.factory = APIRequestFactory() | ||
self.throttle = CustomScopedRateThrottle() | ||
|
||
def test_anonymous_users_get_throttled_based_on_uri_path(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FrankApiyo One trick to make test names shorter is to make use of a docstring e.g
def test_anonymous_users(self):
"""Anonymous users are throttled base on URI path"""
pass
def test_authenticated_users(self):
"""Authenticated users throttled base on user ID"""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
kelvin-muchiri
approved these changes
Aug 30, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will throttle anonymous enketo users more fairly
Changes / Features implemented
Steps taken to verify this change does what is intended
Side effects of implementing this change
Before submitting this PR for review, please make sure you have:
Closes #