diff options
author | Tomasz Miąsko <> | 2019-02-25 00:00:00 +0000 |
---|---|---|
committer | Tomasz Miąsko <> | 2019-02-25 14:21:58 +0100 |
commit | 429634f125819cfdcd0dfab0e5254fc7b687b7a6 (patch) | |
tree | 781286e3ff8d6d2474ba212d7b137901fa0caba3 /tests/test-dconf.py | |
parent | b62ce371159be9f518657ec907b668d91287e7c8 (diff) | |
download | dconf-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/test-dconf.py')
-rwxr-xr-x | tests/test-dconf.py | 4 |
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( |