dbusmock.templates.logind

systemd logind mock template

This creates the expected methods and properties of the main org.freedesktop.login1.Manager object. You can specify D-Bus property values like “CanSuspend” or the return value of Inhibit() in “parameters”.

Attributes

__author__

__copyright__

BUS_NAME

MAIN_OBJ

MAIN_IFACE

SYSTEM_BUS

Functions

load(mock, parameters)

ListUsers(_)

ListSessions(_)

Inhibit(_, what, who, why, mode)

ListInhibitors(_)

AddSeat(self, seat)

Convenience method to add a seat.

AddUser(self, uid, username, active)

Convenience method to add a user.

AddSession(self, session_id, seat, uid, username, active)

Convenience method to add a session.

Module Contents

dbusmock.templates.logind.__author__ = 'Martin Pitt'[source]
Show Value
"""
(c) 2013 Canonical Ltd.
(c) 2017 - 2022 Martin Pitt <martin@piware.de>
"""
dbusmock.templates.logind.BUS_NAME = 'org.freedesktop.login1'[source]
dbusmock.templates.logind.MAIN_OBJ = '/org/freedesktop/login1'[source]
dbusmock.templates.logind.MAIN_IFACE = 'org.freedesktop.login1.Manager'[source]
dbusmock.templates.logind.SYSTEM_BUS = True[source]
dbusmock.templates.logind.load(mock, parameters)[source]
dbusmock.templates.logind.ListUsers(_)[source]
dbusmock.templates.logind.ListSessions(_)[source]
dbusmock.templates.logind.Inhibit(_, what, who, why, mode)[source]
dbusmock.templates.logind.ListInhibitors(_)[source]
dbusmock.templates.logind.AddSeat(self, seat)[source]

Convenience method to add a seat.

Return the object path of the new seat.

dbusmock.templates.logind.AddUser(self, uid, username, active)[source]

Convenience method to add a user.

Return the object path of the new user.

dbusmock.templates.logind.AddSession(self, session_id, seat, uid, username, active)[source]

Convenience method to add a session.

If the given seat and/or user do not exit, they will be created.

Return the object path of the new session.