2015-11-01 17:10:52 +01:00
|
|
|
from __future__ import absolute_import
|
|
|
|
from .settings import *
|
2013-01-10 19:05:53 +01:00
|
|
|
import os
|
2012-10-02 17:57:46 +02:00
|
|
|
|
2013-10-26 04:24:40 +02:00
|
|
|
DATABASES["default"] = {"NAME": "zulip_test",
|
|
|
|
"USER": "zulip_test",
|
2013-11-12 15:29:32 +01:00
|
|
|
"PASSWORD": LOCAL_DATABASE_PASSWORD,
|
2013-05-08 05:30:42 +02:00
|
|
|
"HOST": "localhost",
|
2013-10-26 04:24:40 +02:00
|
|
|
"SCHEMA": "zulip",
|
2013-05-08 05:30:42 +02:00
|
|
|
"ENGINE": "django.db.backends.postgresql_psycopg2",
|
2013-10-26 04:24:40 +02:00
|
|
|
"TEST_NAME": "django_zulip_tests",
|
2014-01-07 22:20:29 +01:00
|
|
|
"OPTIONS": {"connection_factory": TimeTrackingConnection },}
|
2013-05-08 05:30:42 +02:00
|
|
|
|
2012-11-09 18:13:16 +01:00
|
|
|
|
2013-01-10 19:05:53 +01:00
|
|
|
if "TORNADO_SERVER" in os.environ:
|
|
|
|
TORNADO_SERVER = os.environ["TORNADO_SERVER"]
|
|
|
|
else:
|
|
|
|
TORNADO_SERVER = None
|
2012-12-11 18:12:40 +01:00
|
|
|
|
|
|
|
# Decrease the get_updates timeout to 1 second.
|
|
|
|
# This allows CasperJS to proceed quickly to the next test step.
|
|
|
|
POLL_TIMEOUT = 1000
|
2013-01-09 00:10:37 +01:00
|
|
|
|
2013-01-10 19:05:53 +01:00
|
|
|
# Don't use the real message log for tests
|
2013-10-31 19:07:43 +01:00
|
|
|
EVENT_LOG_DIR = '/tmp/zulip-test-event-log'
|
2013-01-10 19:05:53 +01:00
|
|
|
|
|
|
|
# Print our emails rather than sending them
|
|
|
|
EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend'
|
2013-01-10 19:41:49 +01:00
|
|
|
|
2015-08-20 08:34:25 +02:00
|
|
|
# The test suite uses EmailAuthBackend
|
|
|
|
AUTHENTICATION_BACKENDS += ('zproject.backends.EmailAuthBackend',)
|
|
|
|
|
2013-01-10 19:41:49 +01:00
|
|
|
TEST_SUITE = True
|
2013-05-29 23:58:07 +02:00
|
|
|
RATE_LIMITING = False
|
2013-01-11 21:16:42 +01:00
|
|
|
# Don't use rabbitmq from the test suite -- the user_profile_ids for
|
|
|
|
# any generated queue elements won't match those being used by the
|
|
|
|
# real app.
|
|
|
|
USING_RABBITMQ = False
|
|
|
|
|
2013-03-18 18:40:47 +01:00
|
|
|
# Disable the tutorial because it confuses the client tests.
|
|
|
|
TUTORIAL_ENABLED = False
|
|
|
|
|
2013-01-10 19:05:53 +01:00
|
|
|
# Disable use of memcached for caching
|
2013-07-02 23:29:00 +02:00
|
|
|
CACHES['database'] = {
|
|
|
|
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
|
2013-10-26 04:24:40 +02:00
|
|
|
'LOCATION': 'zulip-database-test-cache',
|
2013-07-02 23:29:00 +02:00
|
|
|
'TIMEOUT': 3600,
|
2013-11-08 17:35:40 +01:00
|
|
|
'CONN_MAX_AGE': 600,
|
2013-07-02 23:29:00 +02:00
|
|
|
'OPTIONS': {
|
|
|
|
'MAX_ENTRIES': 100000
|
|
|
|
}
|
|
|
|
}
|
2013-01-22 23:16:56 +01:00
|
|
|
|
2013-08-06 22:51:47 +02:00
|
|
|
LOGGING['loggers']['zulip.requests']['level'] = 'CRITICAL'
|
2013-11-19 00:04:45 +01:00
|
|
|
LOGGING['loggers']['zulip.management']['level'] = 'CRITICAL'
|
2015-08-20 20:07:52 +02:00
|
|
|
|
2015-08-21 08:19:57 +02:00
|
|
|
CAMO_URI = 'https://external-content.zulipcdn.net/'
|
2015-08-20 20:07:52 +02:00
|
|
|
CAMO_KEY = 'dummy'
|