Merge pull request #16137 from edx/mjfrey/enrollment-rate-limit

increase staff user rate limit
This commit is contained in:
Michael Frey
2017-10-02 09:56:56 -04:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -575,7 +575,7 @@ class EnrollmentTest(EnrollmentTestMixin, ModuleStoreTestCase, APITestCase, Ente
self.assert_enrollment_status(username=staff_user.username, expected_status=status.HTTP_200_OK)
# Once the limit is reached, subsequent requests should fail
for attempt in xrange(rate_limit + 10):
for attempt in xrange(rate_limit + 50):
self.assert_enrollment_status(username=staff_user.username, expected_status=status. HTTP_429_TOO_MANY_REQUESTS)
def test_enrollment_throttle_for_service(self):

View File

@@ -75,7 +75,7 @@ class EnrollmentUserThrottle(UserRateThrottle, ApiKeyPermissionMixIn):
"""Limit the number of requests users can make to the enrollment API."""
THROTTLE_RATES = {
'user': '40/minute',
'staff': '400/minute',
'staff': '600/minute',
}
def allow_request(self, request, view):