refactor(tests): format

This commit is contained in:
2026-01-02 20:53:21 -06:00
parent 5a9e066b10
commit beb86880e0
4 changed files with 359 additions and 203 deletions

View File

@@ -16,7 +16,9 @@ def mock_rns():
patch("RNS.Identity") as mock_identity,
patch("threading.Thread"),
patch.object(
ReticulumMeshChat, "announce_loop", new=MagicMock(return_value=None),
ReticulumMeshChat,
"announce_loop",
new=MagicMock(return_value=None),
),
patch.object(
ReticulumMeshChat,
@@ -24,7 +26,9 @@ def mock_rns():
new=MagicMock(return_value=None),
),
patch.object(
ReticulumMeshChat, "crawler_loop", new=MagicMock(return_value=None),
ReticulumMeshChat,
"crawler_loop",
new=MagicMock(return_value=None),
),
):
# Setup mock identity
@@ -215,7 +219,9 @@ async def test_reload_reticulum_failure_recovery(mock_rns, temp_dir):
# We need to make something else fail to reach the except block
# or just mock a method inside the try block to raise.
with patch.object(
app, "teardown_identity", side_effect=Exception("Reload failed"),
app,
"teardown_identity",
side_effect=Exception("Reload failed"),
):
result = await app.reload_reticulum()