Skip to content

Commit

Permalink
fix: failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zawan-ila committed Dec 3, 2024
1 parent d6bab06 commit 0f2deac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion course_discovery/apps/core/tests/test_throttles.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from unittest.mock import patch

import ddt
from django.test.utils import override_settings
from django.urls import reverse
from rest_framework.test import APITestCase

Expand Down Expand Up @@ -103,6 +104,7 @@ def test_staff_with_user_throttle_rate(self):
(['enterprise_openedx_operator:*'], False),
)
@ddt.unpack
@override_settings(ENHANCED_THROTTLE_LIMIT='10/hour')
def test_enterprise_user_throttling_with_jwt_authentication(self, jwt_roles, is_rate_limited):
""" Verify enterprise users are throttled at a higher rate. """
payload = {
Expand All @@ -112,5 +114,5 @@ def test_enterprise_user_throttling_with_jwt_authentication(self, jwt_roles, is_
if is_rate_limited:
self.assert_rate_limited(**headers)
else:
self.assert_rate_limit_successfully_exceeded(count=395, **headers)
self.assert_rate_limit_successfully_exceeded(count=5, **headers)
self.assert_rate_limited(**headers)

0 comments on commit 0f2deac

Please sign in to comment.