refactor(tests): format
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user