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:
Marco Trevisan (Treviño)
2020-02-07 17:46:26 +01:00
committed by Bastien Nocera
parent 06480c7994
commit 24cd986476

View File

@ -154,10 +154,7 @@ class FPrintdTest(dbusmock.DBusTestCase):
cls.test_bus = Gio.TestDBus.new(Gio.TestDBusFlags.NONE)
cls.test_bus.up()
try:
del os.environ['DBUS_SESSION_BUS_ADDRESS']
except KeyError:
pass
cls.test_bus.unset()
addr = cls.test_bus.get_bus_address()
os.environ['DBUS_SYSTEM_BUS_ADDRESS'] = addr
cls.dbus = Gio.DBusConnection.new_for_address_sync(addr,