summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2018-09-30 14:45:21 -0700
committerMicah Lee <micah@micahflee.com>2018-09-30 14:45:21 -0700
commitd28f38b1a03a98de2a79ce750672255cacde36fa (patch)
treec3e5afea5d2cd96c881040036f76aac012f77ca0 /tests
parent2ffcdbb1083dece7664792f7bef9dbf2245e549e (diff)
downloadonionshare-d28f38b1a03a98de2a79ce750672255cacde36fa.tar.gz
onionshare-d28f38b1a03a98de2a79ce750672255cacde36fa.zip
Add locale to Settings, and make it default to the system locale, or English
Diffstat (limited to 'tests')
-rw-r--r--tests/test_onionshare_settings.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_onionshare_settings.py b/tests/test_onionshare_settings.py
index 1f1ef528..371b2d27 100644
--- a/tests/test_onionshare_settings.py
+++ b/tests/test_onionshare_settings.py
@@ -40,7 +40,7 @@ def settings_obj(sys_onionshare_dev_mode, platform_linux):
class TestSettings:
def test_init(self, settings_obj):
- assert settings_obj._settings == settings_obj.default_settings == {
+ expected_settings = {
'version': 'DUMMY_VERSION_1.2.3',
'connection_type': 'bundled',
'control_port_address': '127.0.0.1',
@@ -68,6 +68,11 @@ class TestSettings:
'receive_allow_receiver_shutdown': True,
'public_mode': False
}
+ for key in settings_obj._settings:
+ # Skip locale, it will not always default to the same thing
+ if key != 'locale':
+ assert settings_obj._settings[key] == settings_obj.default_settings[key]
+ assert settings_obj._settings[key] == expected_settings[key]
def test_fill_in_defaults(self, settings_obj):
del settings_obj._settings['version']