welcome-emails: Use followup_day2 for scheduled email tests.

The followup_day2 email is scheduled with a delay as a welcome email
and is therefore more likely to exist as a scheduled email in these
deactivation cases.
This commit is contained in:
Lauryn Menard 2023-06-30 21:25:44 +02:00 committed by Tim Abbott
parent dd59e83d54
commit 0e1acd595b
2 changed files with 7 additions and 7 deletions

View File

@ -323,7 +323,7 @@ class RealmTest(ZulipTestCase):
def test_do_deactivate_realm_clears_scheduled_jobs(self) -> None:
user = self.example_user("hamlet")
send_future_email(
"zerver/emails/followup_day1",
"zerver/emails/followup_day2",
user.realm,
to_user_ids=[user.id],
delay=datetime.timedelta(hours=1),

View File

@ -1618,7 +1618,7 @@ class ActivateTest(ZulipTestCase):
def test_clear_scheduled_jobs(self) -> None:
user = self.example_user("hamlet")
send_future_email(
"zerver/emails/followup_day1",
"zerver/emails/followup_day2",
user.realm,
to_user_ids=[user.id],
delay=datetime.timedelta(hours=1),
@ -1631,7 +1631,7 @@ class ActivateTest(ZulipTestCase):
hamlet = self.example_user("hamlet")
iago = self.example_user("iago")
send_future_email(
"zerver/emails/followup_day1",
"zerver/emails/followup_day2",
iago.realm,
to_user_ids=[hamlet.id, iago.id],
delay=datetime.timedelta(hours=1),
@ -1647,7 +1647,7 @@ class ActivateTest(ZulipTestCase):
hamlet = self.example_user("hamlet")
iago = self.example_user("iago")
send_future_email(
"zerver/emails/followup_day1",
"zerver/emails/followup_day2",
iago.realm,
to_user_ids=[hamlet.id, iago.id],
delay=datetime.timedelta(hours=1),
@ -1662,7 +1662,7 @@ class ActivateTest(ZulipTestCase):
iago = self.example_user("iago")
hamlet = self.example_user("hamlet")
send_future_email(
"zerver/emails/followup_day1",
"zerver/emails/followup_day2",
iago.realm,
to_user_ids=[hamlet.id, iago.id],
delay=datetime.timedelta(hours=1),
@ -1688,7 +1688,7 @@ class ActivateTest(ZulipTestCase):
hamlet = self.example_user("hamlet")
to_user_ids = [hamlet.id, iago.id]
send_future_email(
"zerver/emails/followup_day1",
"zerver/emails/followup_day2",
iago.realm,
to_user_ids=to_user_ids,
delay=datetime.timedelta(hours=1),
@ -1711,7 +1711,7 @@ class ActivateTest(ZulipTestCase):
[
f"WARNING:zulip.send_email:ScheduledEmail {email_id} at {scheduled_at} "
"had empty users and address attributes: "
"{'template_prefix': 'zerver/emails/followup_day1', 'from_name': None, "
"{'template_prefix': 'zerver/emails/followup_day2', 'from_name': None, "
"'from_address': None, 'language': None, 'context': {}}"
],
)