# Path: dbusmock/mockobject.py
# MOCK_IFACE = 'org.freedesktop.DBus.Mock'
# OBJECT_MANAGER_IFACE = 'org.freedesktop.DBus.ObjectManager'
# def load_module(name: str):
# def _format_args(args):
#     def format_arg(a):
# def _wrap_in_dbus_variant(value):
#     def __init__(self, bus_name: str, path: str, interface: str, props: PropsType,
#                  logfile: Optional[str] = None, is_object_manager: bool = False) -> None:
#     def __del__(self) -> None:
#     def _set_up_object_manager(self) -> None:
#     def _reset(self, props: PropsType) -> None:
#     def Get(self, interface_name: str, property_name: str) -> Any:
#     def GetAll(self, interface_name: str, *_, **__) -> PropsType:
#     def Set(self, interface_name: str, property_name: str, value: Any, *_, **__) -> None:
#     def AddObject(self, path: str, interface: str, properties: PropsType, methods: List[MethodType]) -> None:
#     def RemoveObject(self, path: str) -> None:  # pylint: disable=no-self-use
#     def Reset(self) -> None:
#     def AddMethod(self, interface, name: str, in_sig: str, out_sig: str, code: str) -> None:
#     def AddMethods(self, interface: str, methods: List[MethodType]) -> None:
#     def _set_property(self, interface, name, value):
#     def UpdateProperties(self, interface: str, properties: PropsType) -> None:
#     def AddProperty(self, interface: str, name: str, value: Any) -> None:
#     def AddProperties(self, interface: str, properties: PropsType) -> None:
#     def AddTemplate(self, template: str, parameters: PropsType) -> None:
#     def EmitSignal(self, interface: str, name: str, signature: str, args: List[Any]) -> None:
#     def GetCalls(self) -> List[CallLogType]:
#     def GetMethodCalls(self, method: str) -> List[Tuple[int, Sequence[Any]]]:
#     def ClearCalls(self) -> None:
#     def MethodCalled(self, name, args):
#     def object_manager_emit_added(self, path: str) -> None:
#     def object_manager_emit_removed(self, path: str) -> None:
#     def mock_method(self, interface: str, dbus_method: str, in_signature: str, *args, **_) -> Any:
#     def log(self, msg: str) -> None:
#     def Introspect(self, object_path: str, connection: dbus.connection.Connection) -> str:
# def _dbusmock_method_lookup(obj, method_name, dbus_interface):
# def get_objects() -> KeysView[str]:
# def get_object(path) -> DBusMockObject:
# class DBusMockObject(dbus.service.Object):  # pylint: disable=too-many-instance-attributes


import os
import dbus
from dbusmock import OBJECT_MANAGER_IFACE, mockobject
    if agent_path not in manager.agent_paths:
        raise dbus.exceptions.DBusException(
            'Agent not registered ' + agent_path,
            name='org.bluez.Error.DoesNotExist')
    manager.default_agent = agent_path


def load(mock, _parameters):
    mock.AddObject('/org/bluez', AGENT_MANAGER_IFACE, {}, [
        ('RegisterAgent', 'os', '', RegisterAgent),
        ('RequestDefaultAgent', 'o', '', RequestDefaultAgent),
        ('UnregisterAgent', 'o', '', UnregisterAgent),
    ])

    bluez = mockobject.objects['/org/bluez']
    bluez.AddMethods(PROFILE_MANAGER_IFACE, [
        ('RegisterProfile', 'osa{sv}', '', ''),
        ('UnregisterProfile', 'o', '', ''),
    ])
    bluez.agent_paths = []
    bluez.capabilities = {}
    bluez.default_agent = None


@dbus.service.method(ADAPTER_IFACE,
                     in_signature='o', out_signature='')
def RemoveDevice(adapter, path):
    adapter.RemoveObject(path)

    manager = mockobject.objects['/']

# Path: dbusmock/mockobject.py
# MOCK_IFACE = 'org.freedesktop.DBus.Mock'
# OBJECT_MANAGER_IFACE = 'org.freedesktop.DBus.ObjectManager'
# def load_module(name: str):
# def _format_args(args):
#     def format_arg(a):
# def _wrap_in_dbus_variant(value):
#     def __init__(self, bus_name: str, path: str, interface: str, props: PropsType,
#                  logfile: Optional[str] = None, is_object_manager: bool = False) -> None:
#     def __del__(self) -> None:
#     def _set_up_object_manager(self) -> None:
#     def _reset(self, props: PropsType) -> None:
#     def Get(self, interface_name: str, property_name: str) -> Any:
#     def GetAll(self, interface_name: str, *_, **__) -> PropsType:
#     def Set(self, interface_name: str, property_name: str, value: Any, *_, **__) -> None:
#     def AddObject(self, path: str, interface: str, properties: PropsType, methods: List[MethodType]) -> None:
#     def RemoveObject(self, path: str) -> None:  # pylint: disable=no-self-use
#     def Reset(self) -> None:
#     def AddMethod(self, interface, name: str, in_sig: str, out_sig: str, code: str) -> None:
#     def AddMethods(self, interface: str, methods: List[MethodType]) -> None:
#     def _set_property(self, interface, name, value):
#     def UpdateProperties(self, interface: str, properties: PropsType) -> None:
#     def AddProperty(self, interface: str, name: str, value: Any) -> None:
#     def AddProperties(self, interface: str, properties: PropsType) -> None:
#     def AddTemplate(self, template: str, parameters: PropsType) -> None:
#     def EmitSignal(self, interface: str, name: str, signature: str, args: List[Any]) -> None:
#     def GetCalls(self) -> List[CallLogType]:
#     def GetMethodCalls(self, method: str) -> List[Tuple[int, Sequence[Any]]]:
#     def ClearCalls(self) -> None:
#     def MethodCalled(self, name, args):
#     def object_manager_emit_added(self, path: str) -> None:
#     def object_manager_emit_removed(self, path: str) -> None:
#     def mock_method(self, interface: str, dbus_method: str, in_signature: str, *args, **_) -> Any:
#     def log(self, msg: str) -> None:
#     def Introspect(self, object_path: str, connection: dbus.connection.Connection) -> str:
# def _dbusmock_method_lookup(obj, method_name, dbus_interface):
# def get_objects() -> KeysView[str]:
# def get_object(path) -> DBusMockObject:
# class DBusMockObject(dbus.service.Object):  # pylint: disable=too-many-instance-attributes


# Path: dbusmock/templates/bluez5.py
import os
import dbus
from dbusmock import OBJECT_MANAGER_IFACE, mockobject

    if agent_path not in manager.agent_paths:
        raise dbus.exceptions.DBusException(
            'Agent not registered ' + agent_path,
            name='org.bluez.Error.DoesNotExist')
    manager.default_agent = agent_path


def load(mock, _parameters):
    mock.AddObject('/org/bluez', AGENT_MANAGER_IFACE, {}, [
        ('RegisterAgent', 'os', '', RegisterAgent),
        ('RequestDefaultAgent', 'o', '', RequestDefaultAgent),
        ('UnregisterAgent', 'o', '', UnregisterAgent),
    ])

    bluez = mockobject.objects['/org/bluez']
    bluez.AddMethods(PROFILE_MANAGER_IFACE, [
        ('RegisterProfile', 'osa{sv}', '', ''),
        ('UnregisterProfile', 'o', '', ''),
    ])
    bluez.agent_paths = []
    bluez.capabilities = {}
    bluez.default_agent = None


@dbus.service.method(ADAPTER_IFACE,
                     in_signature='o', out_signature='')
def RemoveDevice(adapter, path):
    adapter.RemoveObject(path)

    manager = mockobject.objects['/']

    manager.EmitSignal(OBJECT_MANAGER_IFACE, 'InterfacesRemoved',