Skip to content

Commit 19e5eea

Browse files
authored
fix: fixed issue inducing tests being slow (#390)
1 parent c7e451a commit 19e5eea

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

tests/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ async def _patch_before_every_test(
6060
"app.adapters.cache.valkey_cache.valkey.Valkey",
6161
return_value=valkey_server,
6262
),
63+
# Zero out the throttle start delay so tests don't sleep between Blizzard calls.
64+
# The throttle defaults to a 2s inter-request delay; without this patch every
65+
# test that makes two sequential mocked HTTP calls would wait ~2s needlessly.
66+
# We keep the throttle enabled so that penalty-state (403 → 503) tests still work.
67+
patch("app.adapters.blizzard.throttle.settings.throttle_start_delay", 0.0),
6368
# Prevent ValkeyTaskQueue from dispatching to the broker (not running in tests).
6469
# Deduplication via SET NX/EXISTS still works through the patched fake redis.
6570
patch.dict(TASK_MAP, {}, clear=True),

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)