mirror of
https://github.com/electron/electron.git
synced 2026-01-27 16:28:23 -05:00
14 lines
341 B
Python
14 lines
341 B
Python
from dbusmock import DBusTestCase
|
|
|
|
import atexit
|
|
|
|
def cleanup():
|
|
DBusTestCase.stop_dbus(DBusTestCase.system_bus_pid)
|
|
|
|
|
|
atexit.register(cleanup)
|
|
DBusTestCase.start_system_bus()
|
|
# create a mock for "org.freedesktop.login1" using python-dbusmock
|
|
# preconfigured template
|
|
(logind_mock, logind) = DBusTestCase.spawn_server_template('logind')
|