Reduce scope of bluetooth test fixtures (#116210)
parent
e909074dfb
commit
c9301850be
|
@ -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"):
|
||||
|
|
Loading…
Reference in New Issue