diff --git a/templates/zerver/emails/confirm_new_email.source.html b/templates/zerver/emails/confirm_new_email.source.html index b6689c27bb..8854a18d01 100644 --- a/templates/zerver/emails/confirm_new_email.source.html +++ b/templates/zerver/emails/confirm_new_email.source.html @@ -5,25 +5,10 @@ {% endblock %} {% block content %} -

- {% trans %} - Hi {{ user_name }}, - {% endtrans %} -

+

{% trans %}Hi {{ user_name }},{% endtrans %}

-

- {% trans %} - We received a request to change the email address for the Zulip account on - {{ realm_uri }} from {{ old_email }} to {{ new_email }}. - To confirm this change, please click below: - {% endtrans %} - {{_('Confirm email change') }} -

+

{% trans %}We received a request to change the email address for the Zulip account on {{ realm_uri }} from {{ old_email }} to {{ new_email }}. To confirm this change, please click below:{% endtrans %} +{{_('Confirm email change') }}

-

- {% trans %} - If you did not request this change, please contact us immediately at - {{ support_email }}. - {% endtrans %} -

+

{% trans %}If you did not request this change, please contact us immediately at {{ support_email }}.{% endtrans %}

{% endblock %} diff --git a/templates/zerver/emails/confirm_new_email.txt b/templates/zerver/emails/confirm_new_email.txt index 9b79684ae3..cb9503cc9f 100644 --- a/templates/zerver/emails/confirm_new_email.txt +++ b/templates/zerver/emails/confirm_new_email.txt @@ -1,15 +1,15 @@ -{% trans %} +{% trans -%} Hi {{ user_name }}, -{% endtrans %} +{%- endtrans %} + + +{% trans -%} +We received a request to change the email address for the Zulip account on {{ realm_uri }} from {{ old_email }} to {{ new_email }}. To confirm this change, please click below: +{%- endtrans %} + -{% trans %} -We received a request to change the email address for the Zulip account on -{{ realm_uri }} from {{ old_email }} to {{ new_email }}. -To confirm this change, please click below: -{% endtrans %} {{ activate_url }} -{% trans %} -If you did not request this change, please contact us immediately at -<{{ support_email }}>. -{% endtrans %} +{% trans -%} +If you did not request this change, please contact us immediately at <{{ support_email }}>. +{%- endtrans %} diff --git a/templates/zerver/emails/confirm_registration.source.html b/templates/zerver/emails/confirm_registration.source.html index db07ebe356..3aeda4181c 100644 --- a/templates/zerver/emails/confirm_registration.source.html +++ b/templates/zerver/emails/confirm_registration.source.html @@ -12,11 +12,5 @@ {{ _('Click the button below to complete registration.') }} {{ _('Complete registration') }}

-

- {% trans %} - Contact us any time at - {{ support_email }} - if you run into trouble, have any feedback, or just want to chat! - {% endtrans %} -

+

{% trans %}Contact us any time at {{ support_email }} if you run into trouble, have any feedback, or just want to chat!{% endtrans %}

{% endblock %} diff --git a/templates/zerver/emails/confirm_registration.txt b/templates/zerver/emails/confirm_registration.txt index 43d030ee65..e381cd3357 100644 --- a/templates/zerver/emails/confirm_registration.txt +++ b/templates/zerver/emails/confirm_registration.txt @@ -3,7 +3,4 @@ {{ _('Click the link below to complete registration.') }} <{{ activate_url }}> -{% trans %} -Contact us any time at {{ support_email }} if you run into trouble, -have any feedback, or just want to chat! -{% endtrans %} +{% trans %}Contact us any time at {{ support_email }} if you run into trouble,have any feedback, or just want to chat!{% endtrans %} diff --git a/templates/zerver/emails/find_team.source.html b/templates/zerver/emails/find_team.source.html index eafeee61d6..0e6c9e303c 100644 --- a/templates/zerver/emails/find_team.source.html +++ b/templates/zerver/emails/find_team.source.html @@ -5,14 +5,9 @@ {% endblock %} {% block content %} -

- {% trans %} - Hi {{ user_name }}, - {% endtrans %} -

+

{% trans %}Hi {{ user_name }},{% endtrans %}

-

{% trans %}You can log in to your Zulip organization, {{ realm_name }}, -at the following link:{% endtrans %}

+

{% trans %}You can log in to your Zulip organization, {{ realm_name }}, at the following link:{% endtrans %}

@@ -24,8 +19,7 @@ at the following link:{% endtrans %}

{% trans %}The email address associated with your account is {{ email }}.{% endtrans %}

-

{% trans %}If you have trouble logging in, please contact Zulip support by replying to -this email.{% endtrans %}

+

{% trans %}If you have trouble logging in, please contact Zulip support by replying to this email.{% endtrans %}

{{ _("Thanks for using Zulip!") }}

{% endblock %} diff --git a/templates/zerver/emails/find_team.txt b/templates/zerver/emails/find_team.txt index 49df71800f..78069b2c94 100644 --- a/templates/zerver/emails/find_team.txt +++ b/templates/zerver/emails/find_team.txt @@ -1,14 +1,18 @@ -{% trans %} +{% trans -%} Hi {{ user_name }}, -{% endtrans %} +{%- endtrans %} + + +{% trans -%} +You can log in to your Zulip organization, {{ realm_name }}, at the following link: +{%- endtrans %} -{% trans %}You can log in to your Zulip organization, {{ realm_name }}, -at the following link:{% endtrans %} {{ realm_uri }} {% trans %}The email address associated with your account is {{ email }}.{% endtrans %} -{% trans %}If you have trouble logging in, please contact Zulip support by replying to -this email.{% endtrans %} + +{% trans %}If you have trouble logging in, please contact Zulip support by replying to this email.{% endtrans %} + {{ _("Thanks for using Zulip!") }} diff --git a/templates/zerver/emails/followup_day1.source.html b/templates/zerver/emails/followup_day1.source.html index ee989babd9..c00dc9284e 100644 --- a/templates/zerver/emails/followup_day1.source.html +++ b/templates/zerver/emails/followup_day1.source.html @@ -9,13 +9,9 @@

{% if realm_creation %} - {% trans %} - You've created the new Zulip organization {{ realm_name }}. - {% endtrans %} + {% trans %}You've created the new Zulip organization {{ realm_name }}.{% endtrans %} {% else %} - {% trans %} - You've joined the Zulip organization {{ realm_name }}. - {% endtrans %} + {% trans %}You've joined the Zulip organization {{ realm_name }}.{% endtrans %} {% endif %}

@@ -31,22 +27,14 @@ {% else %}
  • {{ _('Email:') }} {{ email }}
  • {% endif %} - {% trans %} - (you'll need these to sign in to the mobile and desktop apps) - {% endtrans %} + {% trans %}(you'll need these to sign in to the mobile and desktop apps){% endtrans %}

    {% if is_realm_admin %} - {% trans %} - Check out our guide for admins, become a Zulip pro with a - few keyboard shortcuts, or dive right in! - {% endtrans %} + {% trans %}Check out our guide for admins, become a Zulip pro with a few keyboard shortcuts, or dive right in!{% endtrans %} {% else %} - {% trans %} - Learn more about Zulip, become a pro with a few - keyboard shortcuts, or dive right in! - {% endtrans %} + {% trans %}Learn more about Zulip, become a pro with a few keyboard shortcuts, or dive right in!{% endtrans %} {% endif %}

    @@ -56,11 +44,6 @@

    - {% trans %} - PS: Follow us on Twitter, - star us on GitHub, or - chat with us live on the - Zulip community server! - {% endtrans %} + {% trans %}PS: Follow us on Twitter, star us on GitHub, or chat with us live on the Zulip community server!{% endtrans %}

    {% endblock %} diff --git a/templates/zerver/emails/followup_day1.subject.txt b/templates/zerver/emails/followup_day1.subject.txt index 1c4ee764e0..53ab58234e 100644 --- a/templates/zerver/emails/followup_day1.subject.txt +++ b/templates/zerver/emails/followup_day1.subject.txt @@ -1,9 +1,9 @@ {% if realm_creation %} -{% trans %} +{% trans -%} {{ realm_name }} on Zulip: Your new organization details -{% endtrans %} +{%- endtrans %} {% else %} -{% trans %} +{% trans -%} {{ realm_name }} on Zulip: Your new account details -{% endtrans %} +{%- endtrans %} {% endif %} diff --git a/templates/zerver/emails/followup_day1.txt b/templates/zerver/emails/followup_day1.txt index 3394e5c3fb..626a9dfdf2 100644 --- a/templates/zerver/emails/followup_day1.txt +++ b/templates/zerver/emails/followup_day1.txt @@ -1,15 +1,12 @@ {{ _('Welcome to Zulip!') }} {% if realm_creation %} -{% trans %} -You've created the new Zulip organization {{ realm_name }}. -{% endtrans %} +{% trans %}You've created the new Zulip organization {{ realm_name }}.{% endtrans %} {% else %} -{% trans %} -You've joined the Zulip organization {{ realm_name }}. -{% endtrans %} +{% trans %}You've joined the Zulip organization {{ realm_name }}.{% endtrans %} {% endif %} + {{ _('Your account details:') }} * {{ _('Organization URL:') }} {{ realm_uri }} {% if ldap %} @@ -21,27 +18,17 @@ You've joined the Zulip organization {{ realm_name }}. {% else %} * {{ _('Email:') }} {{ email }} {% endif %} -{% trans %} -(you'll need these to sign in to the mobile and desktop apps (https://zulipchat.com/apps)) -{% endtrans %} +{% trans %}(you'll need these to sign in to the mobile and desktop apps (https://zulipchat.com/apps)){% endtrans %} + {% if is_realm_admin %} -{% trans %} -Check out our guide ({{ getting_started_link }}) for admins, become a Zulip pro with a -few keyboard shortcuts ({{ keyboard_shortcuts_link }}), or dive right in to {{ realm_uri }}! -{% endtrans %} +{% trans %}Check out our guide ({{ getting_started_link }}) for admins, become a Zulip pro with a few keyboard shortcuts ({{ keyboard_shortcuts_link }}), or dive right in to {{ realm_uri }}!{% endtrans %} {% else %} -{% trans %} -Learn more ({{ getting_started_link }}) about Zulip, become a pro with a few keyboard -shortcuts ({{ keyboard_shortcuts_link }}), or dive right in to {{ realm_uri }}! -{% endtrans %} +{% trans %}Learn more ({{ getting_started_link }}) about Zulip, become a pro with a few keyboard shortcuts ({{ keyboard_shortcuts_link }}), or dive right in to {{ realm_uri }}!{% endtrans %} {% endif %} + {{ _("Cheers,") }} {{ _("Team Zulip") }} -{% trans %} -PS: Check us out on Twitter (@zulip), star us on GitHub -(https://github.com/zulip/zulip), or chat with us live on the -Zulip community server (https://chat.zulip.org)! -{% endtrans %} +{% trans %}PS: Check us out on Twitter (@zulip), star us on GitHub (https://github.com/zulip/zulip), or chat with us live on the Zulip community server (https://chat.zulip.org)!{% endtrans %} diff --git a/templates/zerver/emails/invitation.source.html b/templates/zerver/emails/invitation.source.html index ed65ca963a..99d73d2df9 100644 --- a/templates/zerver/emails/invitation.source.html +++ b/templates/zerver/emails/invitation.source.html @@ -5,23 +5,16 @@ {% endblock %} {% block content %} -

    {{ _("Hi there,") }} -

    +

    {{ _("Hi there,") }}

    +

    - {% trans %} - {{ referrer_full_name }} ({{ referrer_email }}) - wants you to join them on Zulip — the team communication tool designed for productivity. - {% endtrans %} + {% trans %}{{ referrer_full_name }} ({{ referrer_email }})wants you to join them on Zulip — the team communication tool designed for productivity.{% endtrans %}

    {{ _("To get started, click the button below.") }} {{ _("Complete registration") }}

    - {% trans %} - Contact us any time at - {{ support_email }} - if you run into trouble, have any feedback, or just want to chat! - {% endtrans %} + {% trans %}Contact us any time at {{ support_email }} if you run into trouble, have any feedback, or just want to chat!{% endtrans %}

    {% endblock %} diff --git a/templates/zerver/emails/invitation.txt b/templates/zerver/emails/invitation.txt index d1f4bb6186..71bbf153b6 100644 --- a/templates/zerver/emails/invitation.txt +++ b/templates/zerver/emails/invitation.txt @@ -1,13 +1,8 @@ {{ _("Hi there,") }} -{% trans %} -{{ referrer_full_name }} ({{ referrer_email }}) wants you to join them on Zulip -- the team communication tool designed for productivity. -{% endtrans %} +{% trans %}{{ referrer_full_name }} ({{ referrer_email }}) wants you to join them on Zulip -- the team communication tool designed for productivity.{% endtrans %} {{ _("To get started, click the link below.") }} <{{ activate_url }}> -{% trans %} -Contact us any time at {{ support_email }} if you run into trouble, -have any feedback, or just want to chat! -{% endtrans %} +{% trans %}Contact us any time at {{ support_email }} if you run into trouble,have any feedback, or just want to chat!{% endtrans %} diff --git a/templates/zerver/emails/invitation_reminder.source.html b/templates/zerver/emails/invitation_reminder.source.html index cefcfc7d13..c0f8cebc75 100644 --- a/templates/zerver/emails/invitation_reminder.source.html +++ b/templates/zerver/emails/invitation_reminder.source.html @@ -5,25 +5,17 @@ {% endblock %} {% block content %} -

    {{ _("Hi again,") }} -

    -

    - {% trans %} - This is a friendly reminder that - {{ referrer_name }} ({{ referrer_email }}) - wants you to join them on Zulip — the team communication tool designed for productivity. - {% endtrans %} -

    +

    {{ _("Hi again,") }}

    + +

    {% trans %}This is a friendly reminder that {{ referrer_name }} ({{ referrer_email }}) wants you to join them on Zulip — the team communication tool designed for productivity.{% endtrans %}

    +

    {{ _("To get started, click the button below.") }} {{ _("Complete registration") }}

    +

    {{ _("This is the last reminder you'll receive for this invitation.") }} - {% trans %} - Contact us any time at - {{ support_email }} - if you run into trouble, have any feedback, or just want to chat! - {% endtrans %} + {% trans %}Contact us any time at {{ support_email }} if you run into trouble, have any feedback, or just want to chat!{% endtrans %}

    {% endblock %} diff --git a/templates/zerver/emails/invitation_reminder.txt b/templates/zerver/emails/invitation_reminder.txt index 9167966c5f..e0dd18f8ed 100644 --- a/templates/zerver/emails/invitation_reminder.txt +++ b/templates/zerver/emails/invitation_reminder.txt @@ -1,15 +1,10 @@ {{ _("Hi again,") }} -{% trans %} -This is a friendly reminder that {{ referrer_name }} ({{ referrer_email }}) wants you to join them on Zulip -- the team communication tool designed for productivity. -{% endtrans %} +{% trans %}This is a friendly reminder that {{ referrer_name }} ({{ referrer_email }}) wants you to join them on Zulip -- the team communication tool designed for productivity.{% endtrans %} {{ _("To get started, click the link below.") }} <{{ activate_url }}> {{ _("This is the last reminder you'll receive for this invitation.") }} -{% trans %} -Contact us any time at {{ support_email }} if you run into trouble, -have any feedback, or just want to chat! -{% endtrans %} +{% trans %}Contact us any time at {{ support_email }} if you run into trouble, have any feedback, or just want to chat!{% endtrans %} diff --git a/templates/zerver/emails/notify_change_in_email.txt b/templates/zerver/emails/notify_change_in_email.txt index 7fc41d932b..3f8cf129c0 100644 --- a/templates/zerver/emails/notify_change_in_email.txt +++ b/templates/zerver/emails/notify_change_in_email.txt @@ -1,10 +1,7 @@ {{ _("Hi,") }} -{% trans %} -The email associated with your Zulip account -was recently changed to {{ new_email }}. If you did not request this change, -please contact us immediately at <{{ support_email }}>. -{% endtrans %} +{% trans %}The email associated with your Zulip account was recently changed to {{ new_email }}. If you did not request this change, please contact us immediately at <{{ support_email }}>.{% endtrans %} + {{ _("Best,") }} {{ _("Team Zulip") }} diff --git a/templates/zerver/emails/notify_new_login.source.html b/templates/zerver/emails/notify_new_login.source.html index b67a993273..88301738b4 100644 --- a/templates/zerver/emails/notify_new_login.source.html +++ b/templates/zerver/emails/notify_new_login.source.html @@ -1,7 +1,7 @@ {% extends "zerver/emails/compiled/email_base_default.html" %} {% block preheader %} - {% trans organization_url=realm_uri %}Organization: {{ organization_url }} Time: {{ login_time }} Email: {{ user_email }} {% endtrans %} + {% trans organization_url=realm_uri %}Organization: {{ organization_url }} Time: {{ login_time }} Email: {{ user_email }}{% endtrans %} {% endblock %} {% block illustration %} @@ -12,25 +12,20 @@

    {{ _("We noticed a recent login for the following Zulip account.") }}

    @@ -38,11 +33,7 @@

    {{ _("If this was you, great! There's nothing else you need to do.") }}

    - {% trans %} - If you do not recognize this login, or think your account may have been compromised, please - reset your password - or contact us immediately at {{ support_email }}. - {% endtrans %} + {% trans %}If you do not recognize this login, or think your account may have been compromised, please reset your password or contact us immediately at {{ support_email }}.{% endtrans %}

    diff --git a/templates/zerver/emails/notify_new_login.txt b/templates/zerver/emails/notify_new_login.txt index c7584c60b1..d9e98d015a 100644 --- a/templates/zerver/emails/notify_new_login.txt +++ b/templates/zerver/emails/notify_new_login.txt @@ -1,19 +1,21 @@ {{ _("We noticed a recent login for the following Zulip account.") }} {% trans organization_url=realm_uri %}Organization: {{ organization_url }}{% endtrans %} + {% trans %}Email: {{ user_email }}{% endtrans %} + {% trans %}Time: {{ login_time }}{% endtrans %} + {% trans %}Device: {{ device_browser }} on {{ device_os }}.{% endtrans %} + {% trans %}IP address: {{ device_ip }}{% endtrans %} + {{ _("If this was you, great! There's nothing else you need to do.") }} -{% trans %} -If you do not recognize this login, or think your account may have -been compromised, please reset your password at -{{ realm_uri }}/accounts/password/reset/ -or contact us immediately at {{ support_email }}. -{% endtrans %} +{% trans -%} +If you do not recognize this login, or think your account may have been compromised, please reset your password at {{ realm_uri }}/accounts/password/reset/ or contact us immediately at {{ support_email }}. +{%- endtrans %} {{ _("Thanks,") }} diff --git a/templates/zerver/emails/password_reset.source.html b/templates/zerver/emails/password_reset.source.html index dc3aba7950..f2f6cf89ca 100644 --- a/templates/zerver/emails/password_reset.source.html +++ b/templates/zerver/emails/password_reset.source.html @@ -6,9 +6,7 @@ {% block content %}

    - {% trans %} - Somebody (possibly you) requested a new password for the Zulip account {{ email }} on {{ realm_uri }}. - {% endtrans %} + {% trans %}Somebody (possibly you) requested a new password for the Zulip account {{ email }} on {{ realm_uri }}.{% endtrans %}

    {% if active_account_in_realm %}

    @@ -18,15 +16,9 @@ {% else %}

    {% if user_deactivated %} - {% trans %} - You previously had an account on {{ realm_uri }}, but it has been deactivated. - You can contact an organization administrator to - reactivate your account. - {% endtrans %} + {% trans %}You previously had an account on {{ realm_uri }}, but it has been deactivated. You can contact an organization administrator to reactivate your account.{% endtrans %} {% else %} - {% trans %} - You do not have an account in that Zulip organization. - {% endtrans %} + {% trans %}You do not have an account in that Zulip organization.{% endtrans %} {% endif %}

    @@ -37,14 +29,12 @@

  • {{ active_account.realm.uri }}
  • {% endfor %} - {% trans %} - You can try logging in or resetting your password in the organization(s) above. - {% endtrans %} + {% trans %}You can try logging in or resetting your password in the organization(s) above.{% endtrans %} {% endif %}

    {% endif %} - {% trans %} - If you do not recognize this activity, you can safely ignore this email. - {% endtrans %} +

    + {% trans %}If you do not recognize this activity, you can safely ignore this email.{% endtrans %} +

    {% endblock %} diff --git a/templates/zerver/emails/password_reset.txt b/templates/zerver/emails/password_reset.txt index 2393d728e4..987908a62b 100644 --- a/templates/zerver/emails/password_reset.txt +++ b/templates/zerver/emails/password_reset.txt @@ -1,33 +1,34 @@ -{% trans %} +{% trans -%} Somebody (possibly you) requested a new password for the Zulip account {{ email }} on {{ realm_uri }}. -{% endtrans %} +{%- endtrans %} {% if active_account_in_realm %} {{ _('Click the link below to reset your password.') }} {{ reset_url }} {% else %} {% if user_deactivated %} -{% trans %} -You previously had an account on {{ realm_uri }}, but it has been deactivated. -You can contact an organization administrator to reactivate your account. -{% endtrans %} +{% trans -%} +You previously had an account on {{ realm_uri }}, but it has been deactivated. You can contact an organization administrator to reactivate your account. +{%- endtrans %} {% else %} -{% trans %} +{% trans -%} You do not have an account in that Zulip organization. -{% endtrans %} +{%- endtrans %} {% endif %} {% if active_accounts_in_other_realms %} + {{ _("You do have active accounts in the following organization(s).") }} {% for active_account in active_accounts_in_other_realms %} {{ active_account.realm.uri }} {% endfor %} -{% trans %} + +{% trans -%} You can try logging in or resetting your password in the organization(s) above. -{% endtrans %} +{%- endtrans %} {% endif %} {% endif %} -{% trans %} +{% trans -%} If you do not recognize this activity, you can safely ignore this email. -{% endtrans %} +{%- endtrans %} diff --git a/templates/zerver/emails/realm_reactivation.source.html b/templates/zerver/emails/realm_reactivation.source.html index 629c2e37c3..8fc601809c 100644 --- a/templates/zerver/emails/realm_reactivation.source.html +++ b/templates/zerver/emails/realm_reactivation.source.html @@ -5,32 +5,16 @@ {% endblock %} {% block content %} -

    - {% trans %} - Dear former administrators of {{ realm_name }}, - {% endtrans %} -

    -

    - {% trans %} - One of your administrators requested reactivation of the - previously deactivated Zulip organization hosted at {{ realm_uri }}. - {% endtrans %} -

    +

    {% trans %}Dear former administrators of {{ realm_name }},{% endtrans %}

    + +

    {% trans %}One of your administrators requested reactivation of the previously deactivated Zulip organization hosted at {{ realm_uri }}.{% endtrans %}

    +

    {{ _('Click the button below to reactivate your organization.') }} {{ _('Reactivate organization') }}

    -

    - {% trans %} - If the request was in error, you can take no action and this link - will expire in 24 hours. - {% endtrans %} -

    -

    - {% trans %} - Contact us any time at - {{ support_email }} - if you run into trouble, have any feedback, or just want to chat! - {% endtrans %} -

    + +

    {% trans %}If the request was in error, you can take no action and this link will expire in 24 hours.{% endtrans %}

    + +

    {% trans %}Contact us any time at {{ support_email }} if you run into trouble, have any feedback, or just want to chat!{% endtrans %}

    {% endblock %} diff --git a/templates/zerver/emails/realm_reactivation.txt b/templates/zerver/emails/realm_reactivation.txt index 53b2ddb6f3..973c7b03ec 100644 --- a/templates/zerver/emails/realm_reactivation.txt +++ b/templates/zerver/emails/realm_reactivation.txt @@ -1,20 +1,13 @@ -{% trans %} -Dear former administrators of {{ realm_name }}, -{% endtrans %} +{% trans %}Dear former administrators of {{ realm_name }},{% endtrans %} + + +{% trans %}One of your administrators requested reactivation of the previously deactivated Zulip organization hosted at {{ realm_uri }}.{% endtrans %} -{% trans %} -One of your administrators requested reactivation of the previously deactivated -Zulip organization hosted at {{ realm_uri }}. -{% endtrans %} {{ _('Click the link below to reactivate your organization.') }} <{{ confirmation_url }}> -{% trans %} -If the request was in error, you can take no action and this link will expire in 24 hours. -{% endtrans %} +{% trans %}If the request was in error, you can take no action and this link will expire in 24 hours.{% endtrans %} -{% trans %} -Contact us any time at {{ support_email }} if you run into trouble, -have any feedback, or just want to chat! -{% endtrans %} + +{% trans %}Contact us any time at {{ support_email }} if you run into trouble, have any feedback, or just want to chat!{% endtrans %} diff --git a/zerver/tests/test_email_change.py b/zerver/tests/test_email_change.py index f595b59660..3c0b8ad227 100644 --- a/zerver/tests/test_email_change.py +++ b/zerver/tests/test_email_change.py @@ -102,7 +102,7 @@ class EmailChangeTestCase(ZulipTestCase): tokenized_no_reply_email = parseaddr(email_message.from_email)[1] self.assertTrue(re.search(self.TOKENIZED_NOREPLY_REGEX, tokenized_no_reply_email)) - activation_url = [s for s in body.split('\n') if s][4] + activation_url = [s for s in body.split('\n') if s][2] response = self.client_get(activation_url) self.assert_in_success_response(["This confirms that the email address"], @@ -164,7 +164,7 @@ class EmailChangeTestCase(ZulipTestCase): do_set_realm_property(user_profile.realm, 'email_changes_disabled', True) - activation_url = [s for s in body.split('\n') if s][4] + activation_url = [s for s in body.split('\n') if s][2] response = self.client_get(activation_url) self.assertEqual(response.status_code, 400)