Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

test_email_mirror: Add None check for settings.SHARED_SECRET.

Zixuan James Lif3b2e2b541bd
diff --git a/zerver/tests/test_email_mirror.py b/zerver/tests/test_email_mirror.py
index 8502ba61442..7e8eb3ba6d6 100644
--- a/zerver/tests/test_email_mirror.py
+++ b/zerver/tests/test_email_mirror.py
@@ -1365,6 +1365,7 @@ class TestScriptMTA(ZulipTestCase):
mail_template = self.fixture_data("simple.txt", type="email")
mail = mail_template.format(stream_to_address=stream_to_address, sender=sender)
+ assert settings.SHARED_SECRET is not None
subprocess.run(
[script, "-r", stream_to_address, "-s", settings.SHARED_SECRET, "-t"],
input=mail,
@@ -1380,6 +1381,7 @@ class TestScriptMTA(ZulipTestCase):
stream_to_address = encode_email_address(stream)
mail_template = self.fixture_data("simple.txt", type="email")
mail = mail_template.format(stream_to_address=stream_to_address, sender=sender)
+ assert settings.SHARED_SECRET is not None
p = subprocess.run(
[script, "-s", settings.SHARED_SECRET, "-t"],
input=mail,