From 429634f125819cfdcd0dfab0e5254fc7b687b7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= <> Date: Mon, 25 Feb 2019 00:00:00 +0000 Subject: tests: Avoid using real system bus during tests When a bus address is unset the default value will be used. While the session bus address is overwritten during tests, this not the case for system bus. Use empty invalid addresses as a safer default to avoid accidental connections to the external buses. Issue #51. --- tests/test-dconf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-dconf.py b/tests/test-dconf.py index cf9bb14..6cd80a8 100755 --- a/tests/test-dconf.py +++ b/tests/test-dconf.py @@ -802,8 +802,8 @@ if __name__ == '__main__': os.environ.pop('DCONF_PROFILE', None) os.environ.pop('XDG_DATA_DIRS', None) # Avoid interfering with external message buses. - os.environ.pop('DBUS_SYSTEM_BUS_ADDRESS', None) - os.environ.pop('DBUS_SESSION_BUS_ADDRESS', None) + os.environ['DBUS_SYSTEM_BUS_ADDRESS'] = '' + os.environ['DBUS_SESSION_BUS_ADDRESS'] = '' if len(sys.argv) < 3: message = 'Usage: {} path-to-dconf path-to-dconf-service'.format( -- cgit v1.2.1