2020-06-08 05:56:03 +02:00
|
|
|
import os
|
2021-08-15 18:32:51 +02:00
|
|
|
from typing import Dict, List, Optional, Tuple
|
2020-06-08 05:56:03 +02:00
|
|
|
|
|
|
|
import ldap
|
|
|
|
from django_auth_ldap.config import LDAPSearch
|
|
|
|
|
2023-05-11 03:48:45 +02:00
|
|
|
from zerver.lib.db import TimeTrackingConnection, TimeTrackingCursor
|
2022-09-24 06:44:08 +02:00
|
|
|
from zproject.settings_types import OIDCIdPConfigDict, SAMLIdPConfigDict, SCIMConfigDict
|
2020-06-11 00:54:34 +02:00
|
|
|
|
2020-06-08 05:56:03 +02:00
|
|
|
from .config import DEPLOY_ROOT, get_from_file_if_exists
|
|
|
|
from .settings import (
|
|
|
|
AUTHENTICATION_BACKENDS,
|
|
|
|
CACHES,
|
|
|
|
DATABASES,
|
|
|
|
EXTERNAL_HOST,
|
|
|
|
LOCAL_DATABASE_PASSWORD,
|
|
|
|
LOGGING,
|
|
|
|
)
|
|
|
|
|
2020-09-16 23:47:31 +02:00
|
|
|
FULL_STACK_ZULIP_TEST = "FULL_STACK_ZULIP_TEST" in os.environ
|
|
|
|
PUPPETEER_TESTS = "PUPPETEER_TESTS" in os.environ
|
|
|
|
|
|
|
|
|
2020-06-08 05:56:03 +02:00
|
|
|
FAKE_EMAIL_DOMAIN = "zulip.testserver"
|
|
|
|
|
|
|
|
# Clear out the REALM_HOSTS set in dev_settings.py
|
|
|
|
REALM_HOSTS: Dict[str, str] = {}
|
|
|
|
|
|
|
|
DATABASES["default"] = {
|
|
|
|
"NAME": os.getenv("ZULIP_DB_NAME", "zulip_test"),
|
|
|
|
"USER": "zulip_test",
|
|
|
|
"PASSWORD": LOCAL_DATABASE_PASSWORD,
|
|
|
|
"HOST": "localhost",
|
|
|
|
"SCHEMA": "zulip",
|
|
|
|
"ENGINE": "django.db.backends.postgresql",
|
|
|
|
"TEST_NAME": "django_zulip_tests",
|
2022-07-05 22:38:55 +02:00
|
|
|
"OPTIONS": {
|
|
|
|
"connection_factory": TimeTrackingConnection,
|
2023-05-11 03:48:45 +02:00
|
|
|
"cursor_factory": TimeTrackingCursor,
|
2022-07-05 22:38:55 +02:00
|
|
|
},
|
2020-06-08 05:56:03 +02:00
|
|
|
}
|
|
|
|
|
2020-09-16 23:47:31 +02:00
|
|
|
|
|
|
|
if FULL_STACK_ZULIP_TEST:
|
2020-09-17 00:30:45 +02:00
|
|
|
TORNADO_PORTS = [9983]
|
2020-06-08 05:56:03 +02:00
|
|
|
else:
|
2020-09-17 00:30:45 +02:00
|
|
|
# Backend tests don't use tornado
|
|
|
|
USING_TORNADO = False
|
2021-02-12 08:20:45 +01:00
|
|
|
CAMO_URI = "https://external-content.zulipcdn.net/external_content/"
|
|
|
|
CAMO_KEY = "dummy"
|
2020-06-08 05:56:03 +02:00
|
|
|
|
|
|
|
if "RUNNING_OPENAPI_CURL_TEST" in os.environ:
|
|
|
|
RUNNING_OPENAPI_CURL_TEST = True
|
|
|
|
|
|
|
|
if "GENERATE_STRIPE_FIXTURES" in os.environ:
|
|
|
|
GENERATE_STRIPE_FIXTURES = True
|
|
|
|
|
2020-08-19 12:40:10 +02:00
|
|
|
if "BAN_CONSOLE_OUTPUT" in os.environ:
|
|
|
|
BAN_CONSOLE_OUTPUT = True
|
|
|
|
|
2020-06-08 05:56:03 +02:00
|
|
|
# Decrease the get_updates timeout to 1 second.
|
2020-09-16 23:57:11 +02:00
|
|
|
# This allows frontend tests to proceed quickly to the next test step.
|
2021-06-04 15:12:37 +02:00
|
|
|
EVENT_QUEUE_LONGPOLL_TIMEOUT_SECONDS = 1
|
2020-06-08 05:56:03 +02:00
|
|
|
|
|
|
|
# Stores the messages in `django.core.mail.outbox` rather than sending them.
|
2021-02-12 08:20:45 +01:00
|
|
|
EMAIL_BACKEND = "django.core.mail.backends.locmem.EmailBackend"
|
2020-06-08 05:56:03 +02:00
|
|
|
|
|
|
|
# The test suite uses EmailAuthBackend
|
2021-02-12 08:20:45 +01:00
|
|
|
AUTHENTICATION_BACKENDS += ("zproject.backends.EmailAuthBackend",)
|
2020-06-08 05:56:03 +02:00
|
|
|
|
|
|
|
# Configure Google OAuth2
|
|
|
|
GOOGLE_OAUTH2_CLIENT_ID = "test_client_id"
|
|
|
|
|
|
|
|
# Makes testing LDAP backend require less mocking
|
|
|
|
AUTH_LDAP_ALWAYS_UPDATE_USER = False
|
2021-02-12 08:19:30 +01:00
|
|
|
AUTH_LDAP_USER_SEARCH = LDAPSearch(
|
|
|
|
"ou=users,dc=zulip,dc=com", ldap.SCOPE_ONELEVEL, "(uid=%(user)s)"
|
|
|
|
)
|
2020-06-08 05:56:03 +02:00
|
|
|
AUTH_LDAP_USERNAME_ATTR = "uid"
|
2021-02-12 08:19:30 +01:00
|
|
|
AUTH_LDAP_REVERSE_EMAIL_SEARCH = LDAPSearch(
|
|
|
|
"ou=users,dc=zulip,dc=com", ldap.SCOPE_ONELEVEL, "(mail=%(email)s)"
|
|
|
|
)
|
2020-06-08 05:56:03 +02:00
|
|
|
|
|
|
|
RATE_LIMITING = False
|
|
|
|
RATE_LIMITING_AUTHENTICATE = False
|
2020-10-23 02:43:28 +02:00
|
|
|
# Don't use RabbitMQ from the test suite -- the user_profile_ids for
|
2020-06-08 05:56:03 +02:00
|
|
|
# any generated queue elements won't match those being used by the
|
|
|
|
# real app.
|
|
|
|
USING_RABBITMQ = False
|
|
|
|
|
2021-02-12 08:20:45 +01:00
|
|
|
CACHES["database"] = {
|
|
|
|
"BACKEND": "django.core.cache.backends.dummy.DummyCache",
|
|
|
|
"LOCATION": "zulip-database-test-cache",
|
|
|
|
"TIMEOUT": 3600,
|
|
|
|
"CONN_MAX_AGE": 600,
|
|
|
|
"OPTIONS": {
|
|
|
|
"MAX_ENTRIES": 100000,
|
python: Use trailing commas consistently.
Automatically generated by the following script, based on the output
of lint with flake8-comma:
import re
import sys
last_filename = None
last_row = None
lines = []
for msg in sys.stdin:
m = re.match(
r"\x1b\[35mflake8 \|\x1b\[0m \x1b\[1;31m(.+):(\d+):(\d+): (\w+)", msg
)
if m:
filename, row_str, col_str, err = m.groups()
row, col = int(row_str), int(col_str)
if filename == last_filename:
assert last_row != row
else:
if last_filename is not None:
with open(last_filename, "w") as f:
f.writelines(lines)
with open(filename) as f:
lines = f.readlines()
last_filename = filename
last_row = row
line = lines[row - 1]
if err in ["C812", "C815"]:
lines[row - 1] = line[: col - 1] + "," + line[col - 1 :]
elif err in ["C819"]:
assert line[col - 2] == ","
lines[row - 1] = line[: col - 2] + line[col - 1 :].lstrip(" ")
if last_filename is not None:
with open(last_filename, "w") as f:
f.writelines(lines)
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-10 05:23:40 +02:00
|
|
|
},
|
2020-06-08 05:56:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# Disable caching on sessions to make query counts consistent
|
|
|
|
SESSION_ENGINE = "django.contrib.sessions.backends.db"
|
|
|
|
|
|
|
|
# Use production config from Webpack in tests
|
2020-09-05 15:37:07 +02:00
|
|
|
if PUPPETEER_TESTS:
|
2021-03-17 03:11:19 +01:00
|
|
|
WEBPACK_STATS_FILE = os.path.join(DEPLOY_ROOT, "webpack-stats-production.json")
|
2020-06-08 05:56:03 +02:00
|
|
|
else:
|
2021-03-17 03:11:19 +01:00
|
|
|
WEBPACK_STATS_FILE = os.path.join(DEPLOY_ROOT, "var", "webpack-stats-test.json")
|
|
|
|
WEBPACK_BUNDLES = "webpack-bundles/"
|
2020-06-08 05:56:03 +02:00
|
|
|
|
2020-09-05 15:37:07 +02:00
|
|
|
if not PUPPETEER_TESTS:
|
2020-06-08 05:56:03 +02:00
|
|
|
# Use local memory cache for backend tests.
|
2021-02-12 08:20:45 +01:00
|
|
|
CACHES["default"] = {
|
|
|
|
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
|
2020-06-08 05:56:03 +02:00
|
|
|
}
|
|
|
|
|
2020-07-28 01:29:34 +02:00
|
|
|
# Here we set various loggers to be less noisy for unit tests.
|
2020-06-08 05:56:03 +02:00
|
|
|
def set_loglevel(logger_name: str, level: str) -> None:
|
2021-02-12 08:20:45 +01:00
|
|
|
LOGGING["loggers"].setdefault(logger_name, {})["level"] = level
|
|
|
|
|
|
|
|
set_loglevel("zulip.requests", "CRITICAL")
|
|
|
|
set_loglevel("zulip.management", "CRITICAL")
|
2021-09-01 20:17:33 +02:00
|
|
|
set_loglevel("zulip.auth", "WARNING")
|
2021-02-12 08:20:45 +01:00
|
|
|
set_loglevel("django.request", "ERROR")
|
|
|
|
set_loglevel("django_auth_ldap", "WARNING")
|
|
|
|
set_loglevel("fakeldap", "ERROR")
|
|
|
|
set_loglevel("zulip.send_email", "ERROR")
|
|
|
|
set_loglevel("zerver.lib.push_notifications", "WARNING")
|
|
|
|
set_loglevel("zerver.lib.digest", "ERROR")
|
|
|
|
set_loglevel("zerver.lib.email_mirror", "ERROR")
|
2024-04-16 20:49:37 +02:00
|
|
|
set_loglevel("zerver.worker", "WARNING")
|
2021-02-12 08:20:45 +01:00
|
|
|
set_loglevel("stripe", "WARNING")
|
2020-06-08 05:56:03 +02:00
|
|
|
|
|
|
|
# Enable file:/// hyperlink support by default in tests
|
|
|
|
ENABLE_FILE_LINKS = True
|
|
|
|
|
2022-08-10 06:31:49 +02:00
|
|
|
# This is set dynamically in `zerver/lib/test_runner.py`.
|
2020-06-08 05:56:03 +02:00
|
|
|
# Allow setting LOCAL_UPLOADS_DIR in the environment so that the
|
2020-09-16 23:57:11 +02:00
|
|
|
# frontend/API tests in test_server.py can control this.
|
2020-06-08 05:56:03 +02:00
|
|
|
if "LOCAL_UPLOADS_DIR" in os.environ:
|
|
|
|
LOCAL_UPLOADS_DIR = os.getenv("LOCAL_UPLOADS_DIR")
|
2023-03-06 18:22:35 +01:00
|
|
|
assert LOCAL_UPLOADS_DIR is not None
|
|
|
|
LOCAL_AVATARS_DIR = os.path.join(LOCAL_UPLOADS_DIR, "avatars")
|
|
|
|
LOCAL_FILES_DIR = os.path.join(LOCAL_UPLOADS_DIR, "files")
|
2020-06-08 05:56:03 +02:00
|
|
|
# Otherwise, we use the default value from dev_settings.py
|
|
|
|
|
2021-02-12 08:20:45 +01:00
|
|
|
S3_KEY = "test-key"
|
|
|
|
S3_SECRET_KEY = "test-secret-key"
|
|
|
|
S3_AUTH_UPLOADS_BUCKET = "test-authed-bucket"
|
|
|
|
S3_AVATAR_BUCKET = "test-avatar-bucket"
|
2020-06-08 05:56:03 +02:00
|
|
|
|
|
|
|
INLINE_URL_EMBED_PREVIEW = False
|
|
|
|
|
2021-02-12 08:20:45 +01:00
|
|
|
HOME_NOT_LOGGED_IN = "/login/"
|
|
|
|
LOGIN_URL = "/accounts/login/"
|
2020-06-08 05:56:03 +02:00
|
|
|
|
2023-11-08 01:37:08 +01:00
|
|
|
# If dev_settings.py found a key or cert file to use here, ignore it.
|
|
|
|
APNS_TOKEN_KEY_FILE: Optional[str] = None
|
2023-11-06 20:51:04 +01:00
|
|
|
APNS_CERT_FILE: Optional[str] = None
|
|
|
|
|
2020-06-08 05:56:03 +02:00
|
|
|
# By default will not send emails when login occurs.
|
|
|
|
# Explicitly set this to True within tests that must have this on.
|
|
|
|
SEND_LOGIN_EMAILS = False
|
|
|
|
|
|
|
|
GOOGLE_OAUTH2_CLIENT_ID = "id"
|
|
|
|
GOOGLE_OAUTH2_CLIENT_SECRET = "secret"
|
|
|
|
|
|
|
|
SOCIAL_AUTH_GITHUB_KEY = "key"
|
|
|
|
SOCIAL_AUTH_GITHUB_SECRET = "secret"
|
|
|
|
SOCIAL_AUTH_GITLAB_KEY = "key"
|
|
|
|
SOCIAL_AUTH_GITLAB_SECRET = "secret"
|
|
|
|
SOCIAL_AUTH_GOOGLE_KEY = "key"
|
|
|
|
SOCIAL_AUTH_GOOGLE_SECRET = "secret"
|
2021-02-12 08:20:45 +01:00
|
|
|
SOCIAL_AUTH_SUBDOMAIN = "auth"
|
|
|
|
SOCIAL_AUTH_APPLE_SERVICES_ID = "com.zulip.chat"
|
|
|
|
SOCIAL_AUTH_APPLE_APP_ID = "com.zulip.bundle.id"
|
|
|
|
SOCIAL_AUTH_APPLE_CLIENT = "com.zulip.chat"
|
2020-06-26 12:22:48 +02:00
|
|
|
SOCIAL_AUTH_APPLE_AUDIENCE = [SOCIAL_AUTH_APPLE_APP_ID, SOCIAL_AUTH_APPLE_SERVICES_ID]
|
2021-02-12 08:20:45 +01:00
|
|
|
SOCIAL_AUTH_APPLE_KEY = "KEYISKEY"
|
|
|
|
SOCIAL_AUTH_APPLE_TEAM = "TEAMSTRING"
|
2020-06-08 05:56:03 +02:00
|
|
|
SOCIAL_AUTH_APPLE_SECRET = get_from_file_if_exists("zerver/tests/fixtures/apple/private_key.pem")
|
|
|
|
|
|
|
|
|
2022-07-21 18:46:13 +02:00
|
|
|
SOCIAL_AUTH_OIDC_ENABLED_IDPS: Dict[str, OIDCIdPConfigDict] = {
|
2021-05-21 16:45:43 +02:00
|
|
|
"testoidc": {
|
|
|
|
"display_name": "Test OIDC",
|
|
|
|
"oidc_url": "https://example.com/api/openid",
|
|
|
|
"display_icon": None,
|
|
|
|
"client_id": "key",
|
|
|
|
"secret": "secret",
|
|
|
|
}
|
|
|
|
}
|
2021-05-23 12:00:20 +02:00
|
|
|
SOCIAL_AUTH_OIDC_FULL_NAME_VALIDATED = True
|
2021-05-21 16:45:43 +02:00
|
|
|
|
|
|
|
|
2020-06-08 05:56:03 +02:00
|
|
|
VIDEO_ZOOM_CLIENT_ID = "client_id"
|
|
|
|
VIDEO_ZOOM_CLIENT_SECRET = "client_secret"
|
|
|
|
|
2020-04-27 22:41:31 +02:00
|
|
|
BIG_BLUE_BUTTON_SECRET = "123"
|
|
|
|
BIG_BLUE_BUTTON_URL = "https://bbb.example.com/bigbluebutton/"
|
|
|
|
|
2020-06-08 05:56:03 +02:00
|
|
|
# By default two factor authentication is disabled in tests.
|
|
|
|
# Explicitly set this to True within tests that must have this on.
|
|
|
|
TWO_FACTOR_AUTHENTICATION_ENABLED = False
|
2021-08-15 18:32:51 +02:00
|
|
|
PUSH_NOTIFICATION_BOUNCER_URL: Optional[str] = None
|
2023-12-11 01:29:57 +01:00
|
|
|
DEVELOPMENT_DISABLE_PUSH_BOUNCER_DOMAIN_CHECK = False
|
2020-06-08 05:56:03 +02:00
|
|
|
|
|
|
|
# Logging the emails while running the tests adds them
|
|
|
|
# to /emails page.
|
|
|
|
DEVELOPMENT_LOG_EMAILS = False
|
|
|
|
|
2021-02-12 08:20:45 +01:00
|
|
|
SOCIAL_AUTH_SAML_SP_ENTITY_ID = "http://" + EXTERNAL_HOST
|
2021-02-12 08:19:30 +01:00
|
|
|
SOCIAL_AUTH_SAML_SP_PUBLIC_CERT = get_from_file_if_exists("zerver/tests/fixtures/saml/zulip.crt")
|
2020-06-08 05:56:03 +02:00
|
|
|
SOCIAL_AUTH_SAML_SP_PRIVATE_KEY = get_from_file_if_exists("zerver/tests/fixtures/saml/zulip.key")
|
|
|
|
|
|
|
|
SOCIAL_AUTH_SAML_ORG_INFO = {
|
|
|
|
"en-US": {
|
|
|
|
"name": "example",
|
|
|
|
"displayname": "Example Inc.",
|
2021-02-12 08:20:45 +01:00
|
|
|
"url": "{}{}".format("http://", EXTERNAL_HOST),
|
python: Use trailing commas consistently.
Automatically generated by the following script, based on the output
of lint with flake8-comma:
import re
import sys
last_filename = None
last_row = None
lines = []
for msg in sys.stdin:
m = re.match(
r"\x1b\[35mflake8 \|\x1b\[0m \x1b\[1;31m(.+):(\d+):(\d+): (\w+)", msg
)
if m:
filename, row_str, col_str, err = m.groups()
row, col = int(row_str), int(col_str)
if filename == last_filename:
assert last_row != row
else:
if last_filename is not None:
with open(last_filename, "w") as f:
f.writelines(lines)
with open(filename) as f:
lines = f.readlines()
last_filename = filename
last_row = row
line = lines[row - 1]
if err in ["C812", "C815"]:
lines[row - 1] = line[: col - 1] + "," + line[col - 1 :]
elif err in ["C819"]:
assert line[col - 2] == ","
lines[row - 1] = line[: col - 2] + line[col - 1 :].lstrip(" ")
if last_filename is not None:
with open(last_filename, "w") as f:
f.writelines(lines)
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-10 05:23:40 +02:00
|
|
|
},
|
2020-06-08 05:56:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
SOCIAL_AUTH_SAML_TECHNICAL_CONTACT = {
|
|
|
|
"givenName": "Tech Gal",
|
python: Use trailing commas consistently.
Automatically generated by the following script, based on the output
of lint with flake8-comma:
import re
import sys
last_filename = None
last_row = None
lines = []
for msg in sys.stdin:
m = re.match(
r"\x1b\[35mflake8 \|\x1b\[0m \x1b\[1;31m(.+):(\d+):(\d+): (\w+)", msg
)
if m:
filename, row_str, col_str, err = m.groups()
row, col = int(row_str), int(col_str)
if filename == last_filename:
assert last_row != row
else:
if last_filename is not None:
with open(last_filename, "w") as f:
f.writelines(lines)
with open(filename) as f:
lines = f.readlines()
last_filename = filename
last_row = row
line = lines[row - 1]
if err in ["C812", "C815"]:
lines[row - 1] = line[: col - 1] + "," + line[col - 1 :]
elif err in ["C819"]:
assert line[col - 2] == ","
lines[row - 1] = line[: col - 2] + line[col - 1 :].lstrip(" ")
if last_filename is not None:
with open(last_filename, "w") as f:
f.writelines(lines)
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-10 05:23:40 +02:00
|
|
|
"emailAddress": "technical@example.com",
|
2020-06-08 05:56:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
SOCIAL_AUTH_SAML_SUPPORT_CONTACT = {
|
|
|
|
"givenName": "Support Guy",
|
|
|
|
"emailAddress": "support@example.com",
|
|
|
|
}
|
|
|
|
|
2021-05-30 16:11:01 +02:00
|
|
|
SOCIAL_AUTH_SAML_ENABLED_IDPS: Dict[str, SAMLIdPConfigDict] = {
|
2020-06-08 05:56:03 +02:00
|
|
|
"test_idp": {
|
|
|
|
"entity_id": "https://idp.testshib.org/idp/shibboleth",
|
|
|
|
"url": "https://idp.testshib.org/idp/profile/SAML2/Redirect/SSO",
|
2021-10-21 14:16:26 +02:00
|
|
|
"slo_url": "https://idp.testshib.org/idp/profile/SAML2/Redirect/Logout",
|
2022-11-12 21:44:02 +01:00
|
|
|
"sp_initiated_logout_enabled": True,
|
2020-06-08 05:56:03 +02:00
|
|
|
"x509cert": get_from_file_if_exists("zerver/tests/fixtures/saml/idp.crt"),
|
|
|
|
"attr_user_permanent_id": "email",
|
|
|
|
"attr_first_name": "first_name",
|
|
|
|
"attr_last_name": "last_name",
|
|
|
|
"attr_username": "email",
|
|
|
|
"attr_email": "email",
|
|
|
|
"display_name": "Test IdP",
|
python: Use trailing commas consistently.
Automatically generated by the following script, based on the output
of lint with flake8-comma:
import re
import sys
last_filename = None
last_row = None
lines = []
for msg in sys.stdin:
m = re.match(
r"\x1b\[35mflake8 \|\x1b\[0m \x1b\[1;31m(.+):(\d+):(\d+): (\w+)", msg
)
if m:
filename, row_str, col_str, err = m.groups()
row, col = int(row_str), int(col_str)
if filename == last_filename:
assert last_row != row
else:
if last_filename is not None:
with open(last_filename, "w") as f:
f.writelines(lines)
with open(filename) as f:
lines = f.readlines()
last_filename = filename
last_row = row
line = lines[row - 1]
if err in ["C812", "C815"]:
lines[row - 1] = line[: col - 1] + "," + line[col - 1 :]
elif err in ["C819"]:
assert line[col - 2] == ","
lines[row - 1] = line[: col - 2] + line[col - 1 :].lstrip(" ")
if last_filename is not None:
with open(last_filename, "w") as f:
f.writelines(lines)
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-10 05:23:40 +02:00
|
|
|
},
|
2020-06-08 05:56:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
RATE_LIMITING_RULES: Dict[str, List[Tuple[int, int]]] = {
|
2021-02-12 08:20:45 +01:00
|
|
|
"api_by_user": [],
|
2021-07-08 14:46:47 +02:00
|
|
|
"api_by_ip": [],
|
2021-07-08 14:46:47 +02:00
|
|
|
"api_by_remote_server": [],
|
2021-02-12 08:20:45 +01:00
|
|
|
"authenticate_by_username": [],
|
2021-11-03 21:40:28 +01:00
|
|
|
"sends_email_by_ip": [],
|
2021-11-03 23:20:55 +01:00
|
|
|
"email_change_by_user": [],
|
2021-02-12 08:20:45 +01:00
|
|
|
"password_reset_form_by_email": [],
|
2024-01-17 23:47:15 +01:00
|
|
|
"sends_email_by_remote_server": [],
|
2020-06-08 05:56:03 +02:00
|
|
|
}
|
|
|
|
|
2023-12-09 18:31:27 +01:00
|
|
|
CLOUD_FREE_TRIAL_DAYS: Optional[int] = None
|
2024-01-10 06:03:50 +01:00
|
|
|
SELF_HOSTING_FREE_TRIAL_DAYS: Optional[int] = None
|
2021-09-10 18:36:56 +02:00
|
|
|
|
2022-07-01 13:50:26 +02:00
|
|
|
SCIM_CONFIG: Dict[str, SCIMConfigDict] = {
|
2021-09-10 18:36:56 +02:00
|
|
|
"zulip": {
|
|
|
|
"bearer_token": "token1234",
|
|
|
|
"scim_client_name": "test-scim-client",
|
|
|
|
"name_formatted_included": True,
|
|
|
|
}
|
|
|
|
}
|
2024-05-30 05:45:38 +02:00
|
|
|
|
|
|
|
ALLOW_ANONYMOUS_GROUP_VALUED_SETTINGS = True
|
2024-06-04 22:43:37 +02:00
|
|
|
|
|
|
|
# This override disables the grace period for undoing resolving/unresolving
|
|
|
|
# a topic in tests.
|
|
|
|
# This allows tests to not worry about the special behavior during the grace period.
|
|
|
|
# Otherwise they would have to do lots of mocking of the timer to work around this.
|
|
|
|
RESOLVE_TOPIC_UNDO_GRACE_PERIOD_SECONDS = 0
|