Coverage for wagtailsharing/tests/settings.py: 93%

# Coverage for wagtailsharing/tests/settings.py : 93%

## 15 statements 14 run 1 missing 0 excluded

Hot-keys on this page

r m x p toggle line displays

j k next/prev highlighted chunk

0 (zero) top of page

1 (one) first highlighted chunk

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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | from __future__ import absolute_import, unicode_literals import django import os ALLOWED_HOSTS = ['*'] SECRET_KEY = 'not needed' ROOT_URLCONF = 'wagtailsharing.tests.urls' DATABASES = { 'default': { 'ENGINE': os.environ.get( 'DATABASE_ENGINE', 'django.db.backends.sqlite3' ), 'NAME': os.environ.get('DATABASE_NAME', 'wagtailsharing.sqlite'), 'USER': os.environ.get('DATABASE_USER', None), 'PASSWORD': os.environ.get('DATABASE_PASS', None), 'HOST': os.environ.get('DATABASE_HOST', None), 'TEST': { 'NAME': os.environ.get('DATABASE_NAME', None), }, }, } if django.VERSION >= (1, 10): MIDDLEWARE = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'wagtail.wagtailcore.middleware.SiteMiddleware', ) else: MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'wagtail.wagtailcore.middleware.SiteMiddleware', ) INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.staticfiles', 'taggit', 'wagtail.contrib.modeladmin', 'wagtail.contrib.settings', 'wagtail.tests.testapp', 'wagtail.wagtailadmin', 'wagtail.wagtailcore', 'wagtail.wagtaildocs', 'wagtail.wagtailforms', 'wagtail.wagtailimages', 'wagtail.wagtailsites', 'wagtail.wagtailusers', 'wagtailsharing', ) STATIC_URL = '/static/' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.request', ], 'debug': True, }, }, ] WAGTAIL_SITE_NAME = 'Test Site' WAGTAILADMIN_RICH_TEXT_EDITORS = { 'default': { 'WIDGET': 'wagtail.wagtailadmin.rich_text.HalloRichTextArea' }, 'custom': { 'WIDGET': 'wagtail.tests.testapp.rich_text.CustomRichTextArea' }, }