forked from auracaster/bumble_mirror
Refactor LE emulation with LL and Air Interface
This commit is contained in:
@@ -35,7 +35,7 @@ from bumble.smp import (
|
||||
OobLegacyContext,
|
||||
)
|
||||
|
||||
from .test_utils import TwoDevices
|
||||
from .test_utils import TwoDevices, async_barrier
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Logging
|
||||
@@ -56,12 +56,14 @@ async def test_self_disconnection():
|
||||
two_devices = TwoDevices()
|
||||
await two_devices.setup_connection()
|
||||
await two_devices.connections[0].disconnect()
|
||||
await async_barrier()
|
||||
assert two_devices.connections[0] is None
|
||||
assert two_devices.connections[1] is None
|
||||
|
||||
two_devices = TwoDevices()
|
||||
await two_devices.setup_connection()
|
||||
await two_devices.connections[1].disconnect()
|
||||
await async_barrier()
|
||||
assert two_devices.connections[0] is None
|
||||
assert two_devices.connections[1] is None
|
||||
|
||||
@@ -80,7 +82,8 @@ async def test_self_classic_connection(responder_role):
|
||||
two_devices.devices[1].classic_enabled = True
|
||||
|
||||
# Start
|
||||
await two_devices.setup_connection()
|
||||
for dev in two_devices.devices:
|
||||
await dev.power_on()
|
||||
|
||||
# Connect the two devices
|
||||
await asyncio.gather(
|
||||
@@ -418,8 +421,9 @@ async def test_self_smp_over_classic():
|
||||
two_devices.devices[1].classic_enabled = True
|
||||
|
||||
# Connect the two devices
|
||||
await two_devices.devices[0].power_on()
|
||||
await two_devices.devices[1].power_on()
|
||||
for dev in two_devices.devices:
|
||||
await dev.power_on()
|
||||
|
||||
await asyncio.gather(
|
||||
two_devices.devices[0].connect(
|
||||
two_devices.devices[1].public_address, transport=PhysicalTransport.BR_EDR
|
||||
|
||||
Reference in New Issue
Block a user