mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
send_test_email: Throw an error if email not configured.
This should help minimize confusion when folks try to use this before properly configuring outgoing email. Thanks to Bruce Eckel for the report.
This commit is contained in:
@@ -28,6 +28,11 @@ class TestCheckConfig(ZulipTestCase):
|
||||
with self.assertRaisesRegex(CommandError, "Error: You must set asdf in /etc/zulip/settings.py."):
|
||||
check_config()
|
||||
|
||||
@override_settings(WARN_NO_EMAIL=True)
|
||||
def test_check_send_email(self) -> None:
|
||||
with self.assertRaisesRegex(CommandError, "Outgoing email not yet configured, see"):
|
||||
call_command("send_test_email", 'test@example.com')
|
||||
|
||||
class TestZulipBaseCommand(ZulipTestCase):
|
||||
def setUp(self) -> None:
|
||||
self.zulip_realm = get_realm("zulip")
|
||||
|
||||
Reference in New Issue
Block a user