#!/usr/bin/env python
import sys

from django.conf import settings
from django.core.management import execute_from_command_line


if not settings.configured:
    settings.configure(
        DATABASES={
            'default': {
                'ENGINE': 'django.db.backends.sqlite3',
            }
        },
        OPPS_DB_HOST='127.0.0.1',
        OPPS_DB_PORT=6379,
        OPPS_DB_NAME='opps',
        OPPS_DB_ENGINE='opps.db._redis.Redis',
        TEMPLATE_CONTEXT_PROCESSORS = (
            'opps.channels.context_processors.channel_context',
        ),
        MIDDLEWARE_CLASSES = (
            'django.middleware.common.CommonMiddleware',
            'django.contrib.sessions.middleware.SessionMiddleware',
            'django.middleware.csrf.CsrfViewMiddleware',
            'django.contrib.auth.middleware.AuthenticationMiddleware',
            'django.contrib.messages.middleware.MessageMiddleware',
            'django.contrib.redirects.middleware.RedirectFallbackMiddleware'
        ),
        INSTALLED_APPS = (
            'django.contrib.auth',
            'django.contrib.contenttypes',
            'django.contrib.sessions',
            'django.contrib.sites',
            'opps.contrib.admin',
            'opps.contrib.fileupload',
            'django.contrib.admin',
            'django.contrib.redirects',

            'opps.core',
            'opps.core.tags',
            'opps.containers',
            'opps.boxes',
            'opps.channels',
            'opps.articles',
            'opps.images',
            'opps.sitemaps',
            'opps.flatpages',
            'opps.archives',
            'opps.views',
            'opps.fields',
            'opps.db',
            'opps.contrib.notifications',
        ),
        SITE_ID = 1,
        ROOT_URLCONF = "opps.urls",
        TEST_RUNNER = 'django_coverage.coverage_runner.CoverageRunner',
        STATIC_URL = '/static/',
    )


def runtests():
    argv = sys.argv[:1] + ['test'] + ['core', 'containers', 'articles',
                                      'boxes', 'channels', 'images',
                                      'sitemaps', 'flatpages', 'archives',
                                      'views', 'fields', 'db', 'notifications']
    execute_from_command_line(argv)


if __name__ == '__main__':
    runtests()


@@ -1721,24 +1721,49 @@
 ifications',
+%0A%0A            'djcelery',
 %0A        ),%0A
@@ -1924,16 +1924,257 @@
 atic/',%0A
+        BROKER_BACKEND = %22redis%22,%0A        REDIS_PORT = 6379,%0A        REDIS_HOST = %22localhost%22,%0A        BROKER_URL = %22redis://localhost:6379/0%22,%0A        REDIS_DB = 0,%0A        REDIS_CONNECT_RETRY = True,%0A        CELERY_RESULT_BACKEND ='redis'%0A
     )%0A%0A%0A

Fix test runner, set celery run in redis