1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 04:50:05 +00:00

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
23 changed files with 105 additions and 60 deletions

View File

@@ -11,7 +11,6 @@ import pytest
from homeassistant.components import bluetooth
from homeassistant.components.bluetooth import (
BaseHaScanner,
BluetoothChange,
BluetoothScanningMode,
BluetoothServiceInfo,
@@ -45,6 +44,7 @@ from homeassistant.setup import async_setup_component
from homeassistant.util import dt as dt_util
from . import (
FakeScanner,
_get_manager,
async_setup_with_default_adapter,
generate_advertisement_data,
@@ -2649,7 +2649,7 @@ async def test_getting_the_scanner_returns_the_wrapped_instance(hass, enable_blu
async def test_scanner_count_connectable(hass, enable_bluetooth):
"""Test getting the connectable scanner count."""
scanner = BaseHaScanner(hass, "any", "any")
scanner = FakeScanner(hass, "any", "any")
cancel = bluetooth.async_register_scanner(hass, scanner, False)
assert bluetooth.async_scanner_count(hass, connectable=True) == 1
cancel()
@@ -2657,7 +2657,7 @@ async def test_scanner_count_connectable(hass, enable_bluetooth):
async def test_scanner_count(hass, enable_bluetooth):
"""Test getting the connectable and non-connectable scanner count."""
scanner = BaseHaScanner(hass, "any", "any")
scanner = FakeScanner(hass, "any", "any")
cancel = bluetooth.async_register_scanner(hass, scanner, False)
assert bluetooth.async_scanner_count(hass, connectable=False) == 2
cancel()