File: test_settings.py

package info (click to toggle)
celery-haystack 0.10-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 184 kB
  • sloc: python: 322; makefile: 8
file content (45 lines) | stat: -rw-r--r-- 946 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import os

from celery import Celery

app = Celery('celery_haystack')
app.config_from_object('django.conf:settings')


DEBUG = True

TEST_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), 'tests'))

INSTALLED_APPS = [
    'haystack',
    'djcelery',
    'celery_haystack',
    'celery_haystack.tests',
]

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': ':memory:',
    }
}

SECRET_KEY = 'really-not-secret'

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
)

BROKER_TRANSPORT = "memory"
CELERY_ALWAYS_EAGER = True
CELERY_IGNORE_RESULT = True
CELERYD_LOG_LEVEL = "DEBUG"
CELERY_DEFAULT_QUEUE = "celery-haystack"

HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
        'PATH': os.path.join(TEST_ROOT, 'whoosh_index'),
    }
}
HAYSTACK_SIGNAL_PROCESSOR = 'celery_haystack.signals.CelerySignalProcessor'