From 1c3e5f8ac0694ee695a6ec3db7b9dca0941bae70 Mon Sep 17 00:00:00 2001 From: Kushal Das Date: Thu, 29 Aug 2019 14:57:49 +0530 Subject: [PATCH] Updates based on feedback of strings --- admin/securedrop_admin/__init__.py | 6 +++--- admin/tests/test_integration.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/admin/securedrop_admin/__init__.py b/admin/securedrop_admin/__init__.py index 29d67e73b7..1ba07d0267 100755 --- a/admin/securedrop_admin/__init__.py +++ b/admin/securedrop_admin/__init__.py @@ -172,7 +172,7 @@ def validate(self, document): # is already disabled. if text == 'no' and \ not self.caller._config.get("v2_onion_services"): - raise ValidationError(message="Must be yes as you disabled v2") + raise ValidationError(message="Since you disabled v2 onion services, you must enable v3 onion services.") # noqa: E501 if text == 'yes' or text == 'no': return True raise ValidationError(message="Must be either yes or no") @@ -423,12 +423,12 @@ def __init__(self, args): string.split, lambda config: True], ['v2_onion_services', self.check_for_v2_onion(), bool, - u'Do you want to enable v2 onion services?', + u'Do you want to enable v2 onion services (recommended only for SecureDrop instances installed before 1.0.0)?', # noqa: E501 SiteConfig.ValidateYesNo(), lambda x: x.lower() == 'yes', lambda config: True], ['v3_onion_services', self.check_for_v3_onion, bool, - u'Do you want to enable new v3 onion services?', + u'Do you want to enable v3 onion services (recommended)?', SiteConfig.ValidateYesNoForV3(self), lambda x: x.lower() == 'yes', lambda config: True], diff --git a/admin/tests/test_integration.py b/admin/tests/test_integration.py index 2319a721be..3df4c0eb57 100644 --- a/admin/tests/test_integration.py +++ b/admin/tests/test_integration.py @@ -316,17 +316,17 @@ def verify_locales_prompt(child): def verify_v2_onion_for_first_time(child): - child.expect(r'Do you want to enable v2 onion services\?\:', timeout=2) # noqa: E501 + child.expect(r' installed before 1.0.0\)\?\:', timeout=2) # noqa: E501 assert ANSI_ESCAPE.sub('', child.buffer) == ' no' # Expected default def verify_v3_onion_for_first_time(child): - child.expect(r'Do you want to enable new v3 onion services\?\:', timeout=2) + child.expect(r'Do you want to enable v3 onion services \(recommended\)\?\:', timeout=2) # noqa: E501 assert ANSI_ESCAPE.sub('', child.buffer) == ' yes' # Expected default def verify_v3_onion_when_v2_is_enabled(child): - child.expect(r'Do you want to enable new v3 onion services\?\:', timeout=2) + child.expect(r'Do you want to enable v3 onion services \(recommended\)\?\:', timeout=2) # noqa: E501 assert ANSI_ESCAPE.sub('', child.buffer) == ' yes' # Expected default