dev_settings: Set ZULIP_ADMINISTRATOR.

Fixes this error in the dev environment:

$ ./manage.py checkconfig
Error: You must set ZULIP_ADMINISTRATOR in /etc/zulip/settings.py.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-06-07 18:24:49 -07:00
committed by Tim Abbott
parent b8acd82b72
commit 9824405842
5 changed files with 7 additions and 6 deletions

View File

@@ -1040,7 +1040,7 @@ class StripeTest(StripeTestCase):
self.login_user(hamlet)
with patch("corporate.views.process_initial_upgrade", side_effect=Exception):
response = self.upgrade(talk_to_stripe=False)
self.assert_json_error_contains(response, "Something went wrong. Please contact zulip-admin@example.com.")
self.assert_json_error_contains(response, "Something went wrong. Please contact desdemona+admin@zulip.com.")
self.assertEqual(ujson.loads(response.content)['error_description'], 'uncaught exception during upgrade')
def test_redirect_for_billing_home(self) -> None:

View File

@@ -24,8 +24,7 @@ from confirmation.models import RealmCreationKey, generate_realm_creation_url
class TestCheckConfig(ZulipTestCase):
def test_check_config(self) -> None:
with self.assertRaisesRegex(CommandError, "Error: You must set ZULIP_ADMINISTRATOR in /etc/zulip/settings.py."):
check_config()
check_config()
with self.settings(REQUIRED_SETTINGS=[('asdf', 'not asdf')]):
with self.assertRaisesRegex(CommandError, "Error: You must set asdf in /etc/zulip/settings.py."):
check_config()

View File

@@ -100,7 +100,7 @@ class OpenGraphTest(ZulipTestCase):
'/help/logging-out',
"Logging out (Zulip Help Center)",
# Ideally we'd do something better here
["We're here to help! Email us at zulip-admin@example.com with questions, feedback, or " +
["We're here to help! Email us at desdemona+admin@zulip.com with questions, feedback, or " +
"feature requests."],
["Click on the gear"])
@@ -123,7 +123,7 @@ class OpenGraphTest(ZulipTestCase):
# Probably we should make this "Zulip Help Center"
"No such article. (Zulip Help Center)",
["No such article. | We're here to help!",
"Email us at zulip-admin@example.com with questions, feedback, or feature requests."],
"Email us at desdemona+admin@zulip.com with questions, feedback, or feature requests."],
[],
# Test that our open graph logic doesn't throw a 500
404)

View File

@@ -1133,7 +1133,7 @@ earl-test@zulip.com""", ["Denmark"]))
invitee_emails = ", ".join([str(i) for i in range(get_realm("zulip").max_invites - 1)])
self.assert_json_error(self.invite(invitee_emails, ["Denmark"]),
"You do not have enough remaining invites. "
"Please contact zulip-admin@example.com to have your limit raised. "
"Please contact desdemona+admin@zulip.com to have your limit raised. "
"No invitations were sent.")
def test_missing_or_invalid_params(self) -> None:

View File

@@ -7,6 +7,8 @@ from typing import Set
from .config import DEPLOY_ROOT
ZULIP_ADMINISTRATOR = "desdemona+admin@zulip.com"
# We want LOCAL_UPLOADS_DIR to be an absolute path so that code can
# chdir without having problems accessing it.
LOCAL_UPLOADS_DIR = os.path.join(DEPLOY_ROOT, 'var/uploads')