mirror of
https://github.com/esphome/esphome.git
synced 2026-10-07 11:26:39 +00:00
Clean up iteration residue from the review rounds
- Drop unused includes (ble_client_state.h, <utility>) and the unused notify/indicate property constants (no CCCD path yet) - Note the frozen node-facing surface on the uncalled backend forwarders - Keep the legacy-only 'name' key out of the neutral schema - Move the slot-ledger test to tests/component_tests/bluetooth_connection - Comment accuracy fixes (choke-point wording, wrapped lines, backoff note)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
"""Tests for the cross-component GATT slot ledger."""
|
||||
|
||||
import pytest
|
||||
|
||||
from esphome import config_validation as cv
|
||||
from esphome.components import bluetooth_connection
|
||||
from esphome.const import KEY_CORE, KEY_TARGET_PLATFORM, PLATFORM_RP2
|
||||
from esphome.core import CORE
|
||||
|
||||
|
||||
def test_gatt_slot_ledger_rejects_overcommit_on_rp2() -> None:
|
||||
# The cross-component cap must reject two claims on rp2.
|
||||
CORE.data.setdefault(KEY_CORE, {})[KEY_TARGET_PLATFORM] = PLATFORM_RP2
|
||||
bluetooth_connection.consume_gatt_slot("bluetooth_proxy")({})
|
||||
bluetooth_connection.consume_gatt_slot("ble_client")({})
|
||||
with pytest.raises(cv.Invalid, match="supports at most 1 GATT client"):
|
||||
bluetooth_connection.FINAL_VALIDATE_SCHEMA({})
|
||||
Reference in New Issue
Block a user