Commit 24cd9864 authored by Marco Trevisan's avatar Marco Trevisan Committed by Bastien Nocera
Browse files

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.
parent 06480c79
...@@ -154,10 +154,7 @@ class FPrintdTest(dbusmock.DBusTestCase): ...@@ -154,10 +154,7 @@ class FPrintdTest(dbusmock.DBusTestCase):
cls.test_bus = cls.test_bus =
cls.test_bus.up() cls.test_bus.up()
try: cls.test_bus.unset()
del os.environ['DBUS_SESSION_BUS_ADDRESS']
except KeyError:
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,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment