From c9301850be87f9114ad26de3ec14be85ec20b2de Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Fri, 26 Apr 2024 16:03:49 +0200 Subject: [PATCH] Reduce scope of bluetooth test fixtures (#116210) --- tests/components/bluetooth/conftest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/components/bluetooth/conftest.py b/tests/components/bluetooth/conftest.py index d4056c1e38e..17fbb318248 100644 --- a/tests/components/bluetooth/conftest.py +++ b/tests/components/bluetooth/conftest.py @@ -8,21 +8,21 @@ import habluetooth.util as habluetooth_utils import pytest -@pytest.fixture(name="disable_bluez_manager_socket", autouse=True, scope="session") +@pytest.fixture(name="disable_bluez_manager_socket", autouse=True, scope="package") def disable_bluez_manager_socket(): """Mock the bluez manager socket.""" with patch.object(bleak_manager, "get_global_bluez_manager_with_timeout"): yield -@pytest.fixture(name="disable_dbus_socket", autouse=True, scope="session") +@pytest.fixture(name="disable_dbus_socket", autouse=True, scope="package") def disable_dbus_socket(): """Mock the dbus message bus to avoid creating a socket.""" with patch.object(message_bus, "MessageBus"): yield -@pytest.fixture(name="disable_bluetooth_auto_recovery", autouse=True, scope="session") +@pytest.fixture(name="disable_bluetooth_auto_recovery", autouse=True, scope="package") def disable_bluetooth_auto_recovery(): """Mock out auto recovery.""" with patch.object(habluetooth_utils, "recover_adapter"):