test: remove duplicate rate limiter tests from test_security_fixes

These two tests were exact subsets of the dedicated test_rate_limit.py
suite. Consolidating to a single file avoids maintenance drift.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hugh Brown
2026-03-03 21:45:51 -07:00
committed by Abhimanyu Saharan
parent cc50877131
commit fcbde9b0e1

View File

@@ -492,29 +492,6 @@ class TestWebhookPayloadSizeLimit:
await engine.dispose()
# ---------------------------------------------------------------------------
# Task 11: Rate limiting
# ---------------------------------------------------------------------------
class TestRateLimiting:
"""Tests for the rate limiter module."""
def test_rate_limiter_blocks_after_threshold(self) -> None:
limiter = InMemoryRateLimiter(max_requests=3, window_seconds=60.0)
assert limiter.is_allowed("ip-1") is True
assert limiter.is_allowed("ip-1") is True
assert limiter.is_allowed("ip-1") is True
assert limiter.is_allowed("ip-1") is False
def test_rate_limiter_independent_keys(self) -> None:
limiter = InMemoryRateLimiter(max_requests=1, window_seconds=60.0)
assert limiter.is_allowed("ip-1") is True
assert limiter.is_allowed("ip-1") is False
assert limiter.is_allowed("ip-2") is True
assert limiter.is_allowed("ip-2") is False
# ---------------------------------------------------------------------------
# Task 12: Gateway token redaction
# ---------------------------------------------------------------------------