mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-06 08:43:36 +02:00
Add experimental double send
This commit is contained in:
+2
-1
@@ -169,7 +169,7 @@ class TestMessagesEndpoint:
|
||||
@pytest.mark.asyncio
|
||||
async def test_send_channel_message_duplicate_returns_500(self):
|
||||
"""If MessageRepository.create returns None (duplicate), returns 500."""
|
||||
from app.models import SendChannelMessageRequest
|
||||
from app.models import AppSettings, SendChannelMessageRequest
|
||||
from app.routers.messages import send_channel_message
|
||||
|
||||
mock_mc = MagicMock()
|
||||
@@ -187,6 +187,7 @@ class TestMessagesEndpoint:
|
||||
with (
|
||||
patch("app.dependencies.radio_manager") as mock_rm,
|
||||
patch("app.repository.ChannelRepository") as mock_chan_repo,
|
||||
patch("app.repository.AppSettingsRepository.get", new=AsyncMock(return_value=AppSettings())),
|
||||
patch("app.routers.messages.MessageRepository") as mock_msg_repo,
|
||||
):
|
||||
mock_rm.is_connected = True
|
||||
|
||||
Reference in New Issue
Block a user