Account registration and activation text string revisions
This commit is contained in:
committed by
Bill DeRusha
parent
35267e4777
commit
8b1f28d317
@@ -75,10 +75,10 @@ class ActivationEmailTests(TestCase):
|
||||
# Text fragments we expect in the body of an email
|
||||
# sent from an OpenEdX installation.
|
||||
OPENEDX_FRAGMENTS = [
|
||||
"Thank you for signing up for {platform}.".format(platform=settings.PLATFORM_NAME),
|
||||
"Thank you for creating an account with {platform}!".format(platform=settings.PLATFORM_NAME),
|
||||
"http://edx.org/activate/",
|
||||
(
|
||||
"if you require assistance, check the help section of the "
|
||||
"Check the help section of the "
|
||||
"{platform} website".format(platform=settings.PLATFORM_NAME)
|
||||
)
|
||||
]
|
||||
@@ -86,10 +86,10 @@ class ActivationEmailTests(TestCase):
|
||||
# Text fragments we expect in the body of an email
|
||||
# sent from an EdX-controlled domain.
|
||||
EDX_DOMAIN_FRAGMENTS = [
|
||||
"Thank you for signing up for {platform}".format(platform=settings.PLATFORM_NAME),
|
||||
"Thank you for creating an account with {platform}!".format(platform=settings.PLATFORM_NAME),
|
||||
"http://edx.org/activate/",
|
||||
"https://www.edx.org/contact-us",
|
||||
"This email was automatically sent by edx.org"
|
||||
"This email message was automatically sent by edx.org"
|
||||
]
|
||||
|
||||
def setUp(self):
|
||||
|
||||
@@ -126,7 +126,7 @@ class LoginTest(CacheIsolationTestCase):
|
||||
# Should now be unable to login
|
||||
response, mock_audit_log = self._login_response('test@edx.org', 'test_password')
|
||||
self._assert_response(response, success=False,
|
||||
value="This account has not been activated")
|
||||
value="Before you sign in, you need to activate your account")
|
||||
self._assert_audit_log(mock_audit_log, 'warning', [u'Login failed', u'Account not active for user'])
|
||||
|
||||
@patch.dict("django.conf.settings.FEATURES", {'SQUELCH_PII_IN_LOGS': True})
|
||||
@@ -138,7 +138,7 @@ class LoginTest(CacheIsolationTestCase):
|
||||
# Should now be unable to login
|
||||
response, mock_audit_log = self._login_response('test@edx.org', 'test_password')
|
||||
self._assert_response(response, success=False,
|
||||
value="This account has not been activated")
|
||||
value="Before you sign in, you need to activate your account")
|
||||
self._assert_audit_log(mock_audit_log, 'warning', [u'Login failed', u'Account not active for user'])
|
||||
self._assert_not_in_audit_log(mock_audit_log, 'warning', [u'test'])
|
||||
|
||||
|
||||
@@ -1316,8 +1316,8 @@ def login_user(request, error=""): # pylint: disable=too-many-statements,unused
|
||||
AUDIT_LOG.warning(u"Login failed - Account not active for user {0}, resending activation".format(username))
|
||||
|
||||
reactivation_email_for_user(user)
|
||||
not_activated_msg = _("This account has not been activated. We have sent another activation "
|
||||
"message. Please check your email for the activation instructions.")
|
||||
not_activated_msg = _("Before you sign in, you need to activate your account. We have sent you an "
|
||||
"email message with instructions for activating your account.")
|
||||
return JsonResponse({
|
||||
"success": False,
|
||||
"value": not_activated_msg,
|
||||
|
||||
@@ -361,7 +361,7 @@ class IntegrationTest(testutil.TestCase, test.TestCase):
|
||||
self.assertEqual(200, response.status_code) # Yes, it's a 200 even though it's a failure.
|
||||
payload = json.loads(response.content)
|
||||
self.assertFalse(payload.get('success'))
|
||||
self.assertIn('This account has not been activated', payload.get('value'))
|
||||
self.assertIn('Before you sign in, you need to activate your account', payload.get('value'))
|
||||
|
||||
def assert_json_failure_response_is_missing_social_auth(self, response):
|
||||
"""Asserts failure on /login for missing social auth looks right."""
|
||||
|
||||
Reference in New Issue
Block a user