mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-06-26 10:35:00 +02:00
fix test with cython
This commit is contained in:
parent
6b18b0b33c
commit
ae885ea35f
|
@ -1487,7 +1487,6 @@ async def test_bluetooth_device_connect(
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test bluetooth_device_connect."""
|
"""Test bluetooth_device_connect."""
|
||||||
client, connection, transport, protocol = api_client
|
client, connection, transport, protocol = api_client
|
||||||
send = client._connection.send_messages = MagicMock()
|
|
||||||
states = []
|
states = []
|
||||||
|
|
||||||
def on_bluetooth_connection_state(connected: bool, mtu: int, error: int) -> None:
|
def on_bluetooth_connection_state(connected: bool, mtu: int, error: int) -> None:
|
||||||
|
@ -1512,8 +1511,8 @@ async def test_bluetooth_device_connect(
|
||||||
|
|
||||||
await connect_task
|
await connect_task
|
||||||
assert states == [(True, 23, 0)]
|
assert states == [(True, 23, 0)]
|
||||||
send.assert_called_once_with(
|
transport.write.assert_called_once_with(
|
||||||
(
|
generate_plaintext_packet(
|
||||||
BluetoothDeviceRequest(
|
BluetoothDeviceRequest(
|
||||||
address=1234,
|
address=1234,
|
||||||
request_type=method,
|
request_type=method,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user