From fcbde9b0e1c7bf1344f15bad5a6f679b6b11d4eb Mon Sep 17 00:00:00 2001 From: Hugh Brown Date: Tue, 3 Mar 2026 21:45:51 -0700 Subject: [PATCH] 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 --- backend/tests/test_security_fixes.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/backend/tests/test_security_fixes.py b/backend/tests/test_security_fixes.py index aed4677e..f701c3aa 100644 --- a/backend/tests/test_security_fixes.py +++ b/backend/tests/test_security_fixes.py @@ -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 # ---------------------------------------------------------------------------