summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/tests/test_node_status.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-19 17:58:05 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-19 17:58:05 +0200
commit1ec316035ce9aa656dd18a05889856bce9e3aba3 (patch)
treeb50e97f50d485ef2a88ce36fe4d7511d9fe3e288 /packages/meshbay-node/tests/test_node_status.py
parent171a3e175889ce30f201fcdf5c4632f480344ae6 (diff)
parent95dd3dc13aecec85c2fd72410cd4d1f4ed582dfa (diff)
downloadmeshbay-1ec316035ce9aa656dd18a05889856bce9e3aba3.tar.gz
Merge origin/main: the tree-wide ruff pass beside the Music reconnect work
Diffstat (limited to 'packages/meshbay-node/tests/test_node_status.py')
-rw-r--r--packages/meshbay-node/tests/test_node_status.py23
1 files changed, 11 insertions, 12 deletions
diff --git a/packages/meshbay-node/tests/test_node_status.py b/packages/meshbay-node/tests/test_node_status.py
index 897be33..8bb2f39 100644
--- a/packages/meshbay-node/tests/test_node_status.py
+++ b/packages/meshbay-node/tests/test_node_status.py
@@ -12,22 +12,22 @@ from pathlib import Path
import pytest
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
-
-from conftest import one_root
from meshbay_common.adminop import (
- OP_ROOT_ADD, OP_ROOT_REMOVE, OP_GROUP_ATTACH, OP_MEMBER_UNPIN,
+ OP_MEMBER_UNPIN,
admin_transcript,
)
-from meshbay_node.transport.quic_server import Denylist
from meshbay_common.crypto import pk_to_b64
from meshbay_common.join import ROLE_OPERATOR
from meshbay_common.protocol import MNP
from meshbay_node import ops
from meshbay_node.indexer.group_index import GroupIndex
-from meshbay_node.roster import open_roster
from meshbay_node.roots import RootSet
+from meshbay_node.roster import open_roster
+from meshbay_node.transport.quic_server import Denylist
from meshbay_node.transport.webrtc_server import WebRTCPeerSession
+from conftest import one_root
+
GROUP = "g" * 32
@@ -207,7 +207,6 @@ async def test_node_status_catches_send_failure(tmp_path, roster):
not silently vanish — it used to, because _send was outside the try block."""
session = await _session(tmp_path, roster, operator=True,
node_user_id="grenet")
- original_send = session._send
sent = []
call_count = [0]
@@ -260,7 +259,7 @@ async def test_add_root_creates_directory_and_returns_info(tmp_path):
shared.mkdir()
new_dir = tmp_path / "new_root"
- from meshbay_node.config import NodeConfig, GroupConfig, RootSpec
+ from meshbay_node.config import GroupConfig, NodeConfig, RootSpec
cfg = GroupConfig(id=GROUP, name="test", roots=[
RootSpec(path=str(shared), name="shared", kind="generic", writable=True),
])
@@ -300,7 +299,7 @@ async def test_remove_root_requires_at_least_one_remaining(tmp_path):
shared = tmp_path / "shared"
shared.mkdir()
- from meshbay_node.config import GroupConfig, RootSpec, NodeConfig
+ from meshbay_node.config import GroupConfig, NodeConfig, RootSpec
cfg = GroupConfig(id=GROUP, name="test", roots=[
RootSpec(path=str(shared), name="shared", kind="generic", writable=True),
])
@@ -333,7 +332,7 @@ async def test_removing_a_writable_root_is_allowed(tmp_path):
d1.mkdir()
d2.mkdir()
- from meshbay_node.config import GroupConfig, RootSpec, NodeConfig
+ from meshbay_node.config import GroupConfig, NodeConfig, RootSpec
cfg = GroupConfig(id=GROUP, name="test", roots=[
RootSpec(path=str(d1), name="incoming", kind="generic", writable=True),
RootSpec(path=str(d2), name="shared", kind="generic", writable=False),
@@ -369,7 +368,7 @@ async def test_update_root_rewrites_the_flags_in_node_toml(tmp_path):
d1 = tmp_path / "media"
d1.mkdir()
- from meshbay_node.config import GroupConfig, RootSpec, NodeConfig
+ from meshbay_node.config import GroupConfig, NodeConfig, RootSpec
cfg = GroupConfig(id=GROUP, name="test", roots=[
RootSpec(path=str(d1), name="media", kind="generic", writable=False),
])
@@ -420,7 +419,7 @@ async def test_update_root_replaces_a_legacy_upload_line(tmp_path):
d1 = tmp_path / "media"
d1.mkdir()
- from meshbay_node.config import GroupConfig, RootSpec, NodeConfig
+ from meshbay_node.config import GroupConfig, NodeConfig, RootSpec
cfg = GroupConfig(id=GROUP, name="test", roots=[
RootSpec(path=str(d1), name="media", kind="generic", writable=True),
])
@@ -452,7 +451,7 @@ async def test_remove_root_succeeds_with_two_roots(tmp_path):
d1.mkdir()
d2.mkdir()
- from meshbay_node.config import GroupConfig, RootSpec, NodeConfig
+ from meshbay_node.config import GroupConfig, NodeConfig, RootSpec
cfg = GroupConfig(id=GROUP, name="test", roots=[
RootSpec(path=str(d1), name="dir1", kind="generic", writable=True),
RootSpec(path=str(d2), name="dir2", kind="generic", writable=False),