test: Remove obsolete test_refactor_suite.py
Removed test_refactor_suite.py as it is completely superseded by the comprehensive test suite: Reasons for removal: - Broken: Import errors, cannot run - Incomplete: Contains TODO comments, no actual assertions - Overlapped: Functionality covered by test_multi_device_simulation.py - Inferior: 1 broken test vs 20 passing comprehensive tests - Wrong approach: Tried to run real BLE instances instead of using mocks - Already excluded: Ignored in CI via --ignore flag The multi_device_simulation test suite provides superior coverage: - MockBLEComponents (5 tests) - SimulatedBLENode (3 tests) - TwoDeviceSimulator (6 tests) - IntegrationScenarios (4 tests) - Performance (2 tests) This was leftover scaffolding from the driver abstraction refactor. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
4a9cd1ff66
commit
c1e7e94764
1 changed files with 0 additions and 62 deletions
|
|
@ -1,62 +0,0 @@
|
|||
|
||||
import pytest
|
||||
import asyncio
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Add the project root to the Python path
|
||||
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
||||
sys.path.insert(0, project_root)
|
||||
|
||||
from src.RNS.Interfaces.BLEInterface import BLEInterface
|
||||
|
||||
class MockReticulum:
|
||||
def __init__(self):
|
||||
self.transport_enabled = False
|
||||
self.is_connected_to_shared_instance = False
|
||||
|
||||
def register_interface(self, interface):
|
||||
pass
|
||||
|
||||
class MockOwner:
|
||||
def __init__(self):
|
||||
self.reticulum = MockReticulum()
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_two_device_communication():
|
||||
"""
|
||||
Tests a basic two-device communication scenario where one device acts as a
|
||||
peripheral and the other as a central.
|
||||
"""
|
||||
# Create mock owner and configuration for the peripheral device
|
||||
peripheral_owner = MockOwner()
|
||||
peripheral_config = {
|
||||
'name': 'PeripheralInterface',
|
||||
'enable_central': False,
|
||||
'enable_peripheral': True,
|
||||
'device_name': 'TestPeripheral',
|
||||
}
|
||||
|
||||
# Create mock owner and configuration for the central device
|
||||
central_owner = MockOwner()
|
||||
central_config = {
|
||||
'name': 'CentralInterface',
|
||||
'enable_central': True,
|
||||
'enable_peripheral': False,
|
||||
}
|
||||
|
||||
# Create the peripheral and central interfaces
|
||||
peripheral_interface = BLEInterface(peripheral_owner, peripheral_config)
|
||||
central_interface = BLEInterface(central_owner, central_config)
|
||||
|
||||
# Allow some time for the interfaces to start and for discovery to happen
|
||||
await asyncio.sleep(10)
|
||||
|
||||
# Check that the central has discovered and connected to the peripheral
|
||||
assert len(central_interface.peers) > 0, "Central did not connect to any peers"
|
||||
|
||||
# TODO: Add assertions to verify data exchange
|
||||
|
||||
# Clean up
|
||||
await peripheral_interface.stop()
|
||||
await central_interface.stop()
|
||||
Loading…
Add table
Add a link
Reference in a new issue