@@ -593,10 +593,8 @@ def test_ChangeEmailV2_sends_proper_emails(db, fast_passwords, push_collector: P
593593 with session_scope () as session :
594594 jobs = session .execute (select (BackgroundJob ).where (BackgroundJob .job_type == "send_email" )).scalars ().all ()
595595 assert len (jobs ) == 2
596- uq_str1 = b"An email change to the email"
597- uq_str2 = (
598- b"You requested that your email be changed to this email address on Couchers.org. Your old email address is"
599- )
596+ uq_str1 = b"Email address change initiated"
597+ uq_str2 = b"You requested that your email be changed from"
600598 assert (uq_str1 in jobs [0 ].payload and uq_str2 in jobs [1 ].payload ) or (
601599 uq_str2 in jobs [0 ].payload and uq_str1 in jobs [1 ].payload
602600 )
@@ -651,7 +649,7 @@ def test_DeleteAccount_start(db, email_collector: EmailCollector):
651649 with account_session (token ) as account :
652650 account .DeleteAccount (account_pb2 .DeleteAccountReq (confirm = True , reason = None ))
653651 email = email_collector .pop_for_recipient (user .email , last = True )
654- assert email .subject == "[TEST] Confirm your Couchers.org account deletion"
652+ assert email .subject == "[TEST] Confirm your account deletion"
655653
656654 with session_scope () as session :
657655 deletion_token : AccountDeletionToken = session .execute (
@@ -690,10 +688,10 @@ def test_full_delete_account_with_recovery(db, email_collector: EmailCollector,
690688 account .DeleteAccount (account_pb2 .DeleteAccountReq (confirm = True ))
691689
692690 email = email_collector .pop_for_recipient (user .email , last = True )
693- assert email .subject == "[TEST] Confirm your Couchers.org account deletion"
691+ assert email .subject == "[TEST] Confirm your account deletion"
694692 assert email .recipient == user .email
695693 assert "account deletion" in email .subject .lower ()
696- unique_string = "You requested that we delete your account from Couchers.org."
694+ unique_string = "You requested that we delete your Couchers.org account ."
697695 assert unique_string in email .plain
698696 assert unique_string in email .html
699697 assert "support@couchers.org" in email .plain
@@ -729,7 +727,7 @@ def test_full_delete_account_with_recovery(db, email_collector: EmailCollector,
729727 email = email_collector .pop_for_recipient (user .email , last = True )
730728 assert email .recipient == user .email
731729 assert "account has been deleted" in email .subject .lower ()
732- unique_string = "You have successfully deleted your account from Couchers.org."
730+ unique_string = "You have successfully deleted your Couchers.org account ."
733731 assert unique_string in email .plain
734732 assert unique_string in email .html
735733 assert "7 days" in email .plain
@@ -766,7 +764,7 @@ def test_full_delete_account_with_recovery(db, email_collector: EmailCollector,
766764 email = email_collector .pop_for_recipient (user .email , last = True )
767765 assert email .recipient == user .email
768766 assert "account has been recovered" in email .subject .lower ()
769- unique_string = "Your account on Couchers.org has been successfully recovered! "
767+ unique_string = "Your Couchers.org account has been successfully recovered. "
770768 assert unique_string in email .plain
771769 assert unique_string in email .html
772770 assert "support@couchers.org" in email .plain
0 commit comments