ce23ee18b873d16c82173955118896fe7bf3e3f5
The rate-limit middleware creates a Redis client at module import time when rate_limit_redis_enabled is true. The conftest disables rate_limit_enabled but not the redis flag, so the client still gets created. After the test event loop closes, the client's async disconnect raises 'Event loop is closed', surfacing as 500s on test_validation_error_returns_422_with_field_errors and test_error_stats_with_valid_key. Setting rate_limit_redis_enabled=False in the autouse fixture prevents the Redis client from being created in the first place. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Description
CartSnitch API gateway — frontend-facing REST API
Languages
Python
99.4%
Dockerfile
0.4%
Mako
0.2%