Add abc.ABC to classes with abstract methods (#83546)

This commit is contained in:
Erik Montnemery 2022-12-08 17:50:36 +01:00 committed by GitHub
parent 7091781692
commit c4afc33fc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 105 additions and 60 deletions

View file

@ -2,13 +2,15 @@
from homeassistant.components import bluetooth
from homeassistant.components.bluetooth import BaseHaScanner, async_scanner_by_source
from homeassistant.components.bluetooth import async_scanner_by_source
from . import FakeScanner
async def test_scanner_by_source(hass, enable_bluetooth):
"""Test we can get a scanner by source."""
hci2_scanner = BaseHaScanner(hass, "hci2", "hci2")
hci2_scanner = FakeScanner(hass, "hci2", "hci2")
cancel_hci2 = bluetooth.async_register_scanner(hass, hci2_scanner, True)
assert async_scanner_by_source(hass, "hci2") is hci2_scanner