mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-08 09:43:03 +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:
@@ -10,6 +10,7 @@ from unittest.mock import AsyncMock, MagicMock, patch
|
||||
import pytest
|
||||
from meshcore import EventType
|
||||
|
||||
import app.services.message_send as message_send_service
|
||||
from app.models import SendDirectMessageRequest
|
||||
from app.radio import radio_manager
|
||||
from app.repository import ContactRepository
|
||||
@@ -26,6 +27,12 @@ def _reset_radio_state():
|
||||
radio_manager._operation_lock = prev_lock
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _disable_background_dm_retries(monkeypatch):
|
||||
monkeypatch.setattr(message_send_service, "DM_SEND_MAX_ATTEMPTS", 1)
|
||||
yield
|
||||
|
||||
|
||||
def _make_mc(name="TestNode"):
|
||||
mc = MagicMock()
|
||||
mc.self_info = {"name": name}
|
||||
|
||||
Reference in New Issue
Block a user