refactor: reorganize imports and improve code formatting for readability
This commit is contained in:
@@ -74,7 +74,9 @@ def test_generic_requeue_respects_retry_cap(monkeypatch: pytest.MonkeyPatch, att
|
||||
assert requeued.attempts == attempts + 1
|
||||
|
||||
|
||||
def test_dequeue_task_tolerates_legacy_payload_without_envelope(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
def test_dequeue_task_tolerates_legacy_payload_without_envelope(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
fake = _FakeRedis()
|
||||
|
||||
def _fake_redis(*, redis_url: str | None = None) -> _FakeRedis:
|
||||
|
||||
@@ -127,7 +127,9 @@ class _FakeQueuedItem:
|
||||
self.attempts = attempts
|
||||
|
||||
|
||||
def _patch_dequeue(monkeypatch: pytest.MonkeyPatch, items: list[QueuedInboundDelivery | None]) -> None:
|
||||
def _patch_dequeue(
|
||||
monkeypatch: pytest.MonkeyPatch, items: list[QueuedInboundDelivery | None]
|
||||
) -> None:
|
||||
def _dequeue() -> QueuedInboundDelivery | None:
|
||||
if not items:
|
||||
return None
|
||||
@@ -137,7 +139,9 @@ def _patch_dequeue(monkeypatch: pytest.MonkeyPatch, items: list[QueuedInboundDel
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_dispatch_flush_processes_items_and_throttles(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
async def test_dispatch_flush_processes_items_and_throttles(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
items: list[QueuedInboundDelivery | None] = [
|
||||
_FakeQueuedItem(),
|
||||
_FakeQueuedItem(),
|
||||
|
||||
Reference in New Issue
Block a user