diff --git a/tests/components/bluetooth/test_init.py b/tests/components/bluetooth/test_init.py index f132a6aa150..bd38c9cfbae 100644 --- a/tests/components/bluetooth/test_init.py +++ b/tests/components/bluetooth/test_init.py @@ -129,7 +129,7 @@ async def test_setup_and_stop_passive( assert init_kwargs == { "adapter": "hci0", - "bluez": scanner.PASSIVE_SCANNER_ARGS, + "bluez": scanner.PASSIVE_SCANNER_ARGS, # pylint: disable=c-extension-no-member "scanning_mode": "passive", "detection_callback": ANY, } diff --git a/tests/components/stream/test_hls.py b/tests/components/stream/test_hls.py index 4b2d2a3cd61..6d0b1e12ab8 100644 --- a/tests/components/stream/test_hls.py +++ b/tests/components/stream/test_hls.py @@ -309,6 +309,7 @@ async def test_stream_retries( def av_open_side_effect(*args, **kwargs): hass.loop.call_soon_threadsafe(futures.pop().set_result, None) + # pylint: disable-next=c-extension-no-member raise av.error.InvalidDataError(-2, "error") with ( diff --git a/tests/components/stream/test_worker.py b/tests/components/stream/test_worker.py index c8f3f22196f..2cb90c5ee9a 100644 --- a/tests/components/stream/test_worker.py +++ b/tests/components/stream/test_worker.py @@ -342,6 +342,7 @@ async def test_stream_open_fails(hass: HomeAssistant) -> None: ) stream.add_provider(HLS_PROVIDER) with patch("av.open") as av_open: + # pylint: disable-next=c-extension-no-member av_open.side_effect = av.error.InvalidDataError(-2, "error") with pytest.raises(StreamWorkerError): run_worker(hass, stream, STREAM_SOURCE) @@ -770,6 +771,7 @@ async def test_worker_log( stream.add_provider(HLS_PROVIDER) with patch("av.open") as av_open: + # pylint: disable-next=c-extension-no-member av_open.side_effect = av.error.InvalidDataError(-2, "error") with pytest.raises(StreamWorkerError) as err: run_worker(hass, stream, stream_url) diff --git a/tests/conftest.py b/tests/conftest.py index dee98ecd3b8..01607484d70 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1686,10 +1686,11 @@ def mock_bleak_scanner_start() -> Generator[MagicMock]: # We need to drop the stop method from the object since we patched # out start and this fixture will expire before the stop method is called # when EVENT_HOMEASSISTANT_STOP is fired. + # pylint: disable-next=c-extension-no-member bluetooth_scanner.OriginalBleakScanner.stop = AsyncMock() # type: ignore[assignment] with ( patch.object( - bluetooth_scanner.OriginalBleakScanner, + bluetooth_scanner.OriginalBleakScanner, # pylint: disable=c-extension-no-member "start", ) as mock_bleak_scanner_start, patch.object(bluetooth_scanner, "HaScanner"),