mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-08 20:03:34 +02:00
tests/fprintd: Use GTestDBus unset to undefine envs
Unset the dbus environment that may affect the dbus tests using GTestDBus utility, instead of doing it manually.
This commit is contained in:
committed by
Bastien Nocera
parent
06480c7994
commit
24cd986476
@ -154,10 +154,7 @@ class FPrintdTest(dbusmock.DBusTestCase):
|
|||||||
|
|
||||||
cls.test_bus = Gio.TestDBus.new(Gio.TestDBusFlags.NONE)
|
cls.test_bus = Gio.TestDBus.new(Gio.TestDBusFlags.NONE)
|
||||||
cls.test_bus.up()
|
cls.test_bus.up()
|
||||||
try:
|
cls.test_bus.unset()
|
||||||
del os.environ['DBUS_SESSION_BUS_ADDRESS']
|
|
||||||
except KeyError:
|
|
||||||
pass
|
|
||||||
addr = cls.test_bus.get_bus_address()
|
addr = cls.test_bus.get_bus_address()
|
||||||
os.environ['DBUS_SYSTEM_BUS_ADDRESS'] = addr
|
os.environ['DBUS_SYSTEM_BUS_ADDRESS'] = addr
|
||||||
cls.dbus = Gio.DBusConnection.new_for_address_sync(addr,
|
cls.dbus = Gio.DBusConnection.new_for_address_sync(addr,
|
||||||
|
|||||||
Reference in New Issue
Block a user