summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTomasz Miąsko <>2019-02-25 00:00:00 +0000
committerTomasz Miąsko <>2019-02-25 14:21:58 +0100
commit429634f125819cfdcd0dfab0e5254fc7b687b7a6 (patch)
tree781286e3ff8d6d2474ba212d7b137901fa0caba3 /tests
parentb62ce371159be9f518657ec907b668d91287e7c8 (diff)
downloaddconf-429634f125819cfdcd0dfab0e5254fc7b687b7a6.tar.gz
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.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test-dconf.py4
1 files 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(