From 2fbb9c3ad272d965664f6f08ea7e603eeacc0668 Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Mon, 29 Dec 2025 23:30:07 -0500 Subject: [PATCH] refactor: rename package from RNS.Interfaces to ble_reticulum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes namespace collision with Reticulum's own RNS.Interfaces package. When both packages were installed, the collision caused import issues and prevented BLE discovery between devices. Changes: - Rename src/RNS/Interfaces/ to src/ble_reticulum/ - Update pyproject.toml package configuration - Update all imports in source and test files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- examples/ble_minimal_test.py | 2 +- pyproject.toml | 4 ++-- src/RNS/__init__.py | 0 src/{RNS/Interfaces => ble_reticulum}/BLEAgent.py | 0 .../BLEFragmentation.py | 0 .../Interfaces => ble_reticulum}/BLEGATTServer.py | 2 +- .../Interfaces => ble_reticulum}/BLEInterface.py | 14 +++++++------- src/{RNS/Interfaces => ble_reticulum}/__init__.py | 0 .../bluetooth_driver.py | 0 .../linux_bluetooth_driver.py | 2 +- tests/conftest.py | 2 +- tests/test_ble_peer_interface.py | 2 +- tests/test_bluez_state_cleanup.py | 2 +- tests/test_breddr_fallback_prevention.py | 4 ++-- tests/test_config_directory.py | 2 +- tests/test_dbus_disconnect_monitoring.py | 4 ++-- tests/test_error_recovery.py | 2 +- tests/test_fragmentation.py | 2 +- tests/test_gatt_server.py | 2 +- tests/test_hci_error_fixes.py | 2 +- tests/test_identity_hash.py | 2 +- tests/test_integration.py | 2 +- tests/test_peripheral_disconnect_cleanup.py | 4 ++-- tests/test_scanner_connection_coordination.py | 14 +++++++------- tests/test_stale_connection_polling.py | 2 +- tests/test_v2_2_identity_handshake.py | 8 ++++---- tests/test_v2_2_mac_sorting.py | 10 +++++----- tests/test_v2_2_race_conditions.py | 8 ++++---- 28 files changed, 49 insertions(+), 49 deletions(-) delete mode 100644 src/RNS/__init__.py rename src/{RNS/Interfaces => ble_reticulum}/BLEAgent.py (100%) rename src/{RNS/Interfaces => ble_reticulum}/BLEFragmentation.py (100%) rename src/{RNS/Interfaces => ble_reticulum}/BLEGATTServer.py (99%) rename src/{RNS/Interfaces => ble_reticulum}/BLEInterface.py (99%) rename src/{RNS/Interfaces => ble_reticulum}/__init__.py (100%) rename src/{RNS/Interfaces => ble_reticulum}/bluetooth_driver.py (100%) rename src/{RNS/Interfaces => ble_reticulum}/linux_bluetooth_driver.py (99%) diff --git a/examples/ble_minimal_test.py b/examples/ble_minimal_test.py index e9f6f0c..08f0e73 100755 --- a/examples/ble_minimal_test.py +++ b/examples/ble_minimal_test.py @@ -21,7 +21,7 @@ import asyncio # Add parent directory to path sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../src')) -from RNS.Interfaces.BLEFragmentation import BLEFragmenter, BLEReassembler +from ble_reticulum.BLEFragmentation import BLEFragmenter, BLEReassembler def test_fragmentation(): diff --git a/pyproject.toml b/pyproject.toml index 9dad4e5..aa24bc4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,11 +58,11 @@ Repository = "https://github.com/torlando-tech/ble-reticulum" Issues = "https://github.com/torlando-tech/ble-reticulum/issues" [tool.setuptools] -packages = ["RNS.Interfaces"] +packages = ["ble_reticulum"] package-dir = {"" = "src"} [tool.setuptools.package-data] -"RNS.Interfaces" = ["*.py"] +"ble_reticulum" = ["*.py"] [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/src/RNS/__init__.py b/src/RNS/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/RNS/Interfaces/BLEAgent.py b/src/ble_reticulum/BLEAgent.py similarity index 100% rename from src/RNS/Interfaces/BLEAgent.py rename to src/ble_reticulum/BLEAgent.py diff --git a/src/RNS/Interfaces/BLEFragmentation.py b/src/ble_reticulum/BLEFragmentation.py similarity index 100% rename from src/RNS/Interfaces/BLEFragmentation.py rename to src/ble_reticulum/BLEFragmentation.py diff --git a/src/RNS/Interfaces/BLEGATTServer.py b/src/ble_reticulum/BLEGATTServer.py similarity index 99% rename from src/RNS/Interfaces/BLEGATTServer.py rename to src/ble_reticulum/BLEGATTServer.py index 848b308..a359342 100644 --- a/src/RNS/Interfaces/BLEGATTServer.py +++ b/src/ble_reticulum/BLEGATTServer.py @@ -36,7 +36,7 @@ try: HAS_BLE_AGENT = True except ImportError: try: - from RNS.Interfaces.BLEAgent import register_agent, unregister_agent + from ble_reticulum.BLEAgent import register_agent, unregister_agent HAS_BLE_AGENT = True except ImportError: HAS_BLE_AGENT = False diff --git a/src/RNS/Interfaces/BLEInterface.py b/src/ble_reticulum/BLEInterface.py similarity index 99% rename from src/RNS/Interfaces/BLEInterface.py rename to src/ble_reticulum/BLEInterface.py index 293699e..eaf3fb9 100644 --- a/src/RNS/Interfaces/BLEInterface.py +++ b/src/ble_reticulum/BLEInterface.py @@ -69,15 +69,15 @@ if _interface_dir not in sys.path: # Import base Interface class # When integrated into Reticulum, this will be: -# from RNS.Interfaces.Interface import Interface +# from ble_reticulum.Interface import Interface # For now, we'll need to handle the import path try: - from RNS.Interfaces.Interface import Interface + from ble_reticulum.Interface import Interface except ImportError: # Fallback for development import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../../')) - from RNS.Interfaces.Interface import Interface + from ble_reticulum.Interface import Interface # Import fragmentation module # Note: When loaded as external interface, use absolute imports @@ -85,7 +85,7 @@ try: from BLEFragmentation import BLEFragmenter, BLEReassembler except ImportError: # Fallback for when loaded as part of RNS package - from RNS.Interfaces.BLEFragmentation import BLEFragmenter, BLEReassembler + from ble_reticulum.BLEFragmentation import BLEFragmenter, BLEReassembler # Import GATT server for peripheral mode try: @@ -93,7 +93,7 @@ try: HAS_GATT_SERVER = True except ImportError: try: - from RNS.Interfaces.BLEGATTServer import BLEGATTServer + from ble_reticulum.BLEGATTServer import BLEGATTServer HAS_GATT_SERVER = True except ImportError: HAS_GATT_SERVER = False @@ -102,7 +102,7 @@ except ImportError: try: from bluetooth_driver import BLEDriverInterface, BLEDevice except ImportError: - from RNS.Interfaces.bluetooth_driver import BLEDriverInterface, BLEDevice + from ble_reticulum.bluetooth_driver import BLEDriverInterface, BLEDevice # Import platform-specific driver (optional - can be overridden by subclasses) try: @@ -110,7 +110,7 @@ try: HAS_LINUX_DRIVER = True except ImportError: try: - from RNS.Interfaces.linux_bluetooth_driver import LinuxBluetoothDriver + from ble_reticulum.linux_bluetooth_driver import LinuxBluetoothDriver HAS_LINUX_DRIVER = True except ImportError: HAS_LINUX_DRIVER = False diff --git a/src/RNS/Interfaces/__init__.py b/src/ble_reticulum/__init__.py similarity index 100% rename from src/RNS/Interfaces/__init__.py rename to src/ble_reticulum/__init__.py diff --git a/src/RNS/Interfaces/bluetooth_driver.py b/src/ble_reticulum/bluetooth_driver.py similarity index 100% rename from src/RNS/Interfaces/bluetooth_driver.py rename to src/ble_reticulum/bluetooth_driver.py diff --git a/src/RNS/Interfaces/linux_bluetooth_driver.py b/src/ble_reticulum/linux_bluetooth_driver.py similarity index 99% rename from src/RNS/Interfaces/linux_bluetooth_driver.py rename to src/ble_reticulum/linux_bluetooth_driver.py index 83ed0dd..b2200c3 100644 --- a/src/RNS/Interfaces/linux_bluetooth_driver.py +++ b/src/ble_reticulum/linux_bluetooth_driver.py @@ -184,7 +184,7 @@ try: HAS_BLE_AGENT = True except ImportError: try: - from RNS.Interfaces.BLEAgent import register_agent, unregister_agent + from ble_reticulum.BLEAgent import register_agent, unregister_agent HAS_BLE_AGENT = True except ImportError: HAS_BLE_AGENT = False diff --git a/tests/conftest.py b/tests/conftest.py index b6014a1..44b7fbe 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -237,7 +237,7 @@ def sample_configuration(): def sample_discovered_peers(): """Sample DiscoveredPeer objects for testing.""" try: - from RNS.Interfaces.BLEInterface import DiscoveredPeer + from ble_reticulum.BLEInterface import DiscoveredPeer except ImportError: # Create a simple mock DiscoveredPeer for testing import time diff --git a/tests/test_ble_peer_interface.py b/tests/test_ble_peer_interface.py index fc14ef0..c3d0925 100644 --- a/tests/test_ble_peer_interface.py +++ b/tests/test_ble_peer_interface.py @@ -12,7 +12,7 @@ from unittest.mock import Mock, AsyncMock, patch, MagicMock # Import fragmentation for testing try: - from RNS.Interfaces.BLEFragmentation import BLEFragmenter, BLEReassembler + from ble_reticulum.BLEFragmentation import BLEFragmenter, BLEReassembler except ImportError: BLEFragmenter = None BLEReassembler = None diff --git a/tests/test_bluez_state_cleanup.py b/tests/test_bluez_state_cleanup.py index 5895764..16b39bd 100644 --- a/tests/test_bluez_state_cleanup.py +++ b/tests/test_bluez_state_cleanup.py @@ -220,7 +220,7 @@ class TestRemoveBlueZDeviceMethod: @pytest.mark.asyncio async def test_requires_dbus(self): """Test that method returns False when D-Bus is not available.""" - from RNS.Interfaces import linux_bluetooth_driver + from ble_reticulum import linux_bluetooth_driver # Mock HAS_DBUS to False with patch.object(linux_bluetooth_driver, 'HAS_DBUS', False): diff --git a/tests/test_breddr_fallback_prevention.py b/tests/test_breddr_fallback_prevention.py index 08d5d29..0a93720 100644 --- a/tests/test_breddr_fallback_prevention.py +++ b/tests/test_breddr_fallback_prevention.py @@ -61,7 +61,7 @@ class TestBREDRFallbackPrevention: This tests the pure logic of parameter building, which is fully unit-testable without D-Bus. """ - from RNS.Interfaces import linux_bluetooth_driver + from ble_reticulum import linux_bluetooth_driver # Mock driver driver = Mock() @@ -97,7 +97,7 @@ class TestBREDRFallbackPrevention: This test verifies that we handle the object path return value properly instead of ignoring it. """ - from RNS.Interfaces import linux_bluetooth_driver + from ble_reticulum import linux_bluetooth_driver # Mock the D-Bus call to return an object path (what BlueZ actually returns) mock_object_path = "/org/bluez/hci0/dev_AA_BB_CC_DD_EE_FF" diff --git a/tests/test_config_directory.py b/tests/test_config_directory.py index 287d575..4335c41 100644 --- a/tests/test_config_directory.py +++ b/tests/test_config_directory.py @@ -20,7 +20,7 @@ class TestConfigDirectoryResolution(unittest.TestCase): # Remove BLEInterface from sys.modules if it was imported modules_to_remove = [ 'BLEInterface', - 'RNS.Interfaces.BLEInterface' + 'ble_reticulum.BLEInterface' ] for module in modules_to_remove: if module in sys.modules: diff --git a/tests/test_dbus_disconnect_monitoring.py b/tests/test_dbus_disconnect_monitoring.py index 8576718..5bd03c5 100644 --- a/tests/test_dbus_disconnect_monitoring.py +++ b/tests/test_dbus_disconnect_monitoring.py @@ -56,7 +56,7 @@ class TestDBusDisconnectMonitoring: @pytest.fixture def mock_gatt_server(self, mock_driver): """Create mock GATT server with monitoring setup.""" - from RNS.Interfaces.linux_bluetooth_driver import BluezeroGATTServer + from ble_reticulum.linux_bluetooth_driver import BluezeroGATTServer server = Mock(spec=BluezeroGATTServer) server.driver = mock_driver @@ -304,7 +304,7 @@ class TestDBusDisconnectMonitoring: def test_error_handling_no_dbus(self, mock_gatt_server): """Test that monitoring returns early when D-Bus is not available.""" - with patch('RNS.Interfaces.linux_bluetooth_driver.HAS_DBUS', False): + with patch('ble_reticulum.linux_bluetooth_driver.HAS_DBUS', False): # Simulate the early return logic HAS_DBUS = False diff --git a/tests/test_error_recovery.py b/tests/test_error_recovery.py index 4d40497..e7067f4 100644 --- a/tests/test_error_recovery.py +++ b/tests/test_error_recovery.py @@ -13,7 +13,7 @@ from unittest.mock import Mock, AsyncMock, patch, MagicMock # conftest.py handles path setup - imports should work after that # Import only what we need for testing try: - from RNS.Interfaces.BLEFragmentation import BLEFragmenter, BLEReassembler + from ble_reticulum.BLEFragmentation import BLEFragmenter, BLEReassembler except ImportError: # If imports fail, tests will be skipped BLEFragmenter = None diff --git a/tests/test_fragmentation.py b/tests/test_fragmentation.py index 56d6eaa..d31370f 100755 --- a/tests/test_fragmentation.py +++ b/tests/test_fragmentation.py @@ -10,7 +10,7 @@ import os # Add parent directory to path sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../src')) -from RNS.Interfaces.BLEFragmentation import BLEFragmenter, BLEReassembler, HDLCFramer +from ble_reticulum.BLEFragmentation import BLEFragmenter, BLEReassembler, HDLCFramer class TestBLEFragmenter: diff --git a/tests/test_gatt_server.py b/tests/test_gatt_server.py index cf661e4..0c396d7 100644 --- a/tests/test_gatt_server.py +++ b/tests/test_gatt_server.py @@ -11,7 +11,7 @@ import os # Add src to path sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'src')) -from RNS.Interfaces.BLEGATTServer import BLEGATTServer, BLESS_AVAILABLE +from ble_reticulum.BLEGATTServer import BLEGATTServer, BLESS_AVAILABLE class MockInterface: diff --git a/tests/test_hci_error_fixes.py b/tests/test_hci_error_fixes.py index 0408150..2bd07fc 100644 --- a/tests/test_hci_error_fixes.py +++ b/tests/test_hci_error_fixes.py @@ -56,7 +56,7 @@ class TestEventDrivenDBusMonitor: @pytest.fixture def mock_gatt_server(self, mock_driver): """Create mock GATT server with event-driven monitoring setup.""" - from RNS.Interfaces.linux_bluetooth_driver import BluezeroGATTServer + from ble_reticulum.linux_bluetooth_driver import BluezeroGATTServer server = Mock(spec=BluezeroGATTServer) server.driver = mock_driver diff --git a/tests/test_identity_hash.py b/tests/test_identity_hash.py index 5c120fd..32bdfca 100644 --- a/tests/test_identity_hash.py +++ b/tests/test_identity_hash.py @@ -107,7 +107,7 @@ class TestComputeIdentityHash: # Read the actual BLEInterface.py source ble_interface_path = os.path.join( os.path.dirname(__file__), - '../src/RNS/Interfaces/BLEInterface.py' + '../src/ble_reticulum/BLEInterface.py' ) with open(ble_interface_path, 'r') as f: diff --git a/tests/test_integration.py b/tests/test_integration.py index 583dd5b..e986ecb 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -28,7 +28,7 @@ def test_interface_has_gatt_integration(): code = f.read() # Check for driver-based architecture - assert 'from RNS.Interfaces.bluetooth_driver import BLEDriverInterface' in code or 'bluetooth_driver' in code + assert 'from ble_reticulum.bluetooth_driver import BLEDriverInterface' in code or 'bluetooth_driver' in code # Check for peripheral mode configuration assert 'enable_peripheral' in code diff --git a/tests/test_peripheral_disconnect_cleanup.py b/tests/test_peripheral_disconnect_cleanup.py index de4ba49..e57f32c 100644 --- a/tests/test_peripheral_disconnect_cleanup.py +++ b/tests/test_peripheral_disconnect_cleanup.py @@ -456,7 +456,7 @@ class TestRealWorldScenario: Verifies that cleanup is idempotent - if both mechanisms detect the same disconnect, cleanup should only happen once without errors. """ - from RNS.Interfaces.linux_bluetooth_driver import BluezeroGATTServer + from ble_reticulum.linux_bluetooth_driver import BluezeroGATTServer # Setup GATT server with monitoring server = Mock(spec=BluezeroGATTServer) @@ -502,7 +502,7 @@ class TestRealWorldScenario: Simulates scenario where D-Bus signal fails or is delayed, but polling fallback detects and triggers cleanup within 30 seconds. """ - from RNS.Interfaces.linux_bluetooth_driver import BluezeroGATTServer + from ble_reticulum.linux_bluetooth_driver import BluezeroGATTServer # Setup GATT server server = Mock(spec=BluezeroGATTServer) diff --git a/tests/test_scanner_connection_coordination.py b/tests/test_scanner_connection_coordination.py index 02c1c2e..d8cb8ea 100644 --- a/tests/test_scanner_connection_coordination.py +++ b/tests/test_scanner_connection_coordination.py @@ -70,7 +70,7 @@ class TestScannerConnectionCoordination: if scanning should be paused based on connection state. """ # Import the actual driver to test real method - from RNS.Interfaces import linux_bluetooth_driver + from ble_reticulum import linux_bluetooth_driver # Create minimal driver instance driver = Mock() @@ -103,7 +103,7 @@ class TestScannerConnectionCoordination: This test reproduces the core bug - scanner doesn't know to pause when connections are active. """ - from RNS.Interfaces import linux_bluetooth_driver + from ble_reticulum import linux_bluetooth_driver driver = Mock() driver._connecting_peers = {"AA:BB:CC:DD:EE:FF"} @@ -126,7 +126,7 @@ class TestScannerConnectionCoordination: PASSES AFTER FIX: Method correctly handles multiple connections """ - from RNS.Interfaces import linux_bluetooth_driver + from ble_reticulum import linux_bluetooth_driver driver = Mock() driver._connecting_peers = { @@ -156,7 +156,7 @@ class TestScannerConnectionCoordination: This test verifies the coordination logic is actually used in the scan loop. We mock BleakScanner to avoid real Bluetooth operations. """ - from RNS.Interfaces import linux_bluetooth_driver + from ble_reticulum import linux_bluetooth_driver # Create mock driver driver = Mock() @@ -196,7 +196,7 @@ class TestScannerConnectionCoordination: PASSES AFTER FIX: Scanner starts when _connecting_peers is empty """ - from RNS.Interfaces import linux_bluetooth_driver + from ble_reticulum import linux_bluetooth_driver driver = Mock() driver._connecting_peers = set() # No connections @@ -231,7 +231,7 @@ class TestScannerConnectionCoordination: 2. Connection completes -> peer removed from _connecting_peers 3. Next scan loop iteration -> scanner resumes """ - from RNS.Interfaces import linux_bluetooth_driver + from ble_reticulum import linux_bluetooth_driver driver = Mock() driver._connecting_peers = {"AA:BB:CC:DD:EE:FF"} @@ -280,7 +280,7 @@ class TestScannerConnectionCoordination: - It correctly identifies when to pause - It prevents scanner.start() calls during connections """ - from RNS.Interfaces import linux_bluetooth_driver + from ble_reticulum import linux_bluetooth_driver driver = Mock() driver._log = Mock() diff --git a/tests/test_stale_connection_polling.py b/tests/test_stale_connection_polling.py index d296edd..22ba253 100644 --- a/tests/test_stale_connection_polling.py +++ b/tests/test_stale_connection_polling.py @@ -56,7 +56,7 @@ class TestStaleConnectionPolling: @pytest.fixture def mock_gatt_server(self, mock_driver): """Create mock GATT server with polling setup.""" - from RNS.Interfaces.linux_bluetooth_driver import BluezeroGATTServer + from ble_reticulum.linux_bluetooth_driver import BluezeroGATTServer server = Mock(spec=BluezeroGATTServer) server.driver = mock_driver diff --git a/tests/test_v2_2_identity_handshake.py b/tests/test_v2_2_identity_handshake.py index 1ee89ff..0f9d87a 100644 --- a/tests/test_v2_2_identity_handshake.py +++ b/tests/test_v2_2_identity_handshake.py @@ -53,11 +53,11 @@ if not hasattr(RNS, 'Identity'): RNS.Identity = MagicMock() RNS.Identity.full_hash = lambda x: (x * 2)[:16] # Simple mock -# Mock RNS.Interfaces.Interface (required by BLEInterface.py) +# Mock ble_reticulum.Interface (required by BLEInterface.py) # First, ensure mock is in place BEFORE any imports that need it rns_interfaces_mock = MagicMock() -_sys.modules['RNS.Interfaces'] = rns_interfaces_mock -_sys.modules['RNS.Interfaces.Interface'] = MagicMock() +_sys.modules['ble_reticulum'] = rns_interfaces_mock +_sys.modules['ble_reticulum.Interface'] = MagicMock() # Create mock Interface base class class MockInterface: @@ -89,7 +89,7 @@ class MockInterface: return ConfigObj(configuration) rns_interfaces_mock.Interface = MockInterface -_sys.modules['RNS.Interfaces.Interface'].Interface = MockInterface +_sys.modules['ble_reticulum.Interface'].Interface = MockInterface from tests.mock_ble_driver import MockBLEDriver diff --git a/tests/test_v2_2_mac_sorting.py b/tests/test_v2_2_mac_sorting.py index 9ca5038..81eee45 100644 --- a/tests/test_v2_2_mac_sorting.py +++ b/tests/test_v2_2_mac_sorting.py @@ -59,9 +59,9 @@ if not hasattr(RNS, 'Identity'): RNS.Identity = MagicMock() RNS.Identity.full_hash = lambda x: (x * 2)[:16] -# Mock RNS.Interfaces.Interface module (the base class module, not the whole namespace) +# Mock ble_reticulum.Interface module (the base class module, not the whole namespace) # We only mock the Interface.py module, allowing BLEInterface.py to be imported from src/ -if 'RNS.Interfaces.Interface' not in _sys.modules: +if 'ble_reticulum.Interface' not in _sys.modules: # Create mock Interface base class class MockInterface: MODE_FULL = 1 @@ -100,13 +100,13 @@ if 'RNS.Interfaces.Interface' not in _sys.modules: return bool(val) if val is not None else default return ConfigObj(configuration) - # Create a mock module for RNS.Interfaces.Interface + # Create a mock module for ble_reticulum.Interface interface_module = MagicMock() interface_module.Interface = MockInterface - _sys.modules['RNS.Interfaces.Interface'] = interface_module + _sys.modules['ble_reticulum.Interface'] = interface_module from tests.mock_ble_driver import MockBLEDriver -from RNS.Interfaces.BLEInterface import BLEInterface, DiscoveredPeer +from ble_reticulum.BLEInterface import BLEInterface, DiscoveredPeer import time diff --git a/tests/test_v2_2_race_conditions.py b/tests/test_v2_2_race_conditions.py index 7d4bca2..afa13a2 100644 --- a/tests/test_v2_2_race_conditions.py +++ b/tests/test_v2_2_race_conditions.py @@ -64,10 +64,10 @@ if not hasattr(RNS, 'Identity'): RNS.Identity = MagicMock() RNS.Identity.full_hash = lambda x: (x * 2)[:16] -# Mock RNS.Interfaces.Interface (required by BLEInterface.py) -if 'RNS.Interfaces' not in _sys.modules: +# Mock ble_reticulum.Interface (required by BLEInterface.py) +if 'ble_reticulum' not in _sys.modules: rns_interfaces_mock = MagicMock() - _sys.modules['RNS.Interfaces'] = rns_interfaces_mock + _sys.modules['ble_reticulum'] = rns_interfaces_mock # Create mock Interface base class class MockInterface: @@ -80,7 +80,7 @@ if 'RNS.Interfaces' not in _sys.modules: rns_interfaces_mock.Interface = MockInterface from tests.mock_ble_driver import MockBLEDriver -from RNS.Interfaces.BLEInterface import BLEInterface, DiscoveredPeer +from ble_reticulum.BLEInterface import BLEInterface, DiscoveredPeer class MockOwner: