mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-06-30 23:11:13 +02:00
Do better DM retry to align with stndard firmware retry (but so that we can track the acks). Closes #73.
This commit is contained in:
@@ -12,6 +12,7 @@ from unittest.mock import AsyncMock, MagicMock, patch
|
||||
import pytest
|
||||
from fastapi import HTTPException
|
||||
|
||||
import app.services.message_send as message_send_service
|
||||
from app.radio import radio_manager
|
||||
from app.repository import (
|
||||
ChannelRepository,
|
||||
@@ -39,6 +40,12 @@ def _reset_radio_state():
|
||||
radio_manager._channel_key_by_slot = prev_key_by_slot
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _disable_background_dm_retries(monkeypatch):
|
||||
monkeypatch.setattr(message_send_service, "DM_SEND_MAX_ATTEMPTS", 1)
|
||||
yield
|
||||
|
||||
|
||||
def _patch_require_connected(mc=None, *, detail="Radio not connected"):
|
||||
if mc is None:
|
||||
return patch(
|
||||
|
||||
Reference in New Issue
Block a user