Add linux powerMonitor tests using python-dbusmock
This commit is contained in:
parent
897712359f
commit
dfd98e3428
4 changed files with 118 additions and 0 deletions
13
script/lib/dbus_mock.py
Normal file
13
script/lib/dbus_mock.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
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')
|
Loading…
Add table
Add a link
Reference in a new issue