send_custom_email: Improve printing of outgoing emails.

The fake email addresses are not useful for debugging/confirmation,
and additionally it's nice to have the realms listed as well.
This commit is contained in:
Tim Abbott 2021-04-27 16:25:56 -07:00
parent 123a46e41d
commit a0e18cb06a
2 changed files with 2 additions and 2 deletions

View File

@ -91,4 +91,4 @@ class Command(ZulipBaseCommand):
if options["dry_run"]:
print("Would send the above email to:")
for user in users:
print(f" {user.email}")
print(f" {user.delivery_email} ({user.realm.string_id})")

View File

@ -592,6 +592,6 @@ class TestSendCustomEmail(ZulipTestCase):
mock_print.mock_calls[1:],
[
call("Would send the above email to:"),
call(" user10@zulip.testserver"),
call(" hamlet@zulip.com (zulip)"),
],
)