def METHOD_NAME(self, portal_mock):
    request = portal_mock.create_request()
    options = {
        "session_handle_token": "session_token0",
    }
    response = request.call(
        "CreateSession",
        options=options,
    )
    assert response.response == 0
    session = Session.from_response(portal_mock.dbus_con, response)
    request = portal_mock.create_request()
    options = {
        "types": dbus.UInt32(0x3),
    }
    response = request.call(
        "SelectDevices",
        session_handle=session.handle,
        options=options,
    )
    assert response.response == 0
    request = portal_mock.create_request()
    options = {}
    response = request.call(
        "Start",
        session_handle=session.handle,
        parent_window="",
        options=options,
    )
    assert response.response == 0
    for notifyfunc in [
        {"name": "NotifyPointerMotion", "args": (1, 2)},
        {"name": "NotifyPointerMotionAbsolute", "args": (0, 1, 2)},
        {"name": "NotifyPointerButton", "args": (1, 1)},
        {"name": "NotifyPointerAxis", "args": (1, 1)},
        {"name": "NotifyPointerAxisDiscrete", "args": (1, 1)},
        {"name": "NotifyKeyboardKeycode", "args": (1, 1)},
        {"name": "NotifyKeyboardKeysym", "args": (1, 1)},
        {"name": "NotifyTouchDown", "args": (0, 0, 1, 1)},
        {"name": "NotifyTouchMotion", "args": (0, 0, 1, 1)},
        {"name": "NotifyTouchUp", "args": (0,)},
    ]:
        with pytest.raises(dbus.exceptions.DBusException) as excinfo:
            rd_intf = portal_mock.get_dbus_interface()
            func = getattr(rd_intf, notifyfunc["name"])
            assert func is not None
            func(
                session.handle,
                dbus.Dictionary({}, signature="sv"),
                *notifyfunc["args"]
            )
        # Not the best error message but...
        assert (
            "Session is not allowed to call Notify"
            in excinfo.value.get_dbus_message()
        )