Fix setup environment
This commit is contained in:
parent
92d0ce2c3e
commit
be0bedb248
4 changed files with 89 additions and 11 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -43,4 +43,3 @@ lokalize*
|
|||
|
||||
.idea
|
||||
docs
|
||||
tests
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
django>=1.5.1
|
||||
https://github.com/divio/django-cms/archive/develop.zip
|
||||
django-cms>3.0
|
||||
coverage
|
||||
mock>=1.0.1
|
||||
nose>=1.3.0
|
||||
|
|
95
runtests.py
95
runtests.py
|
@ -1,5 +1,6 @@
|
|||
import sys
|
||||
from optparse import OptionParser
|
||||
gettext = lambda s: s
|
||||
|
||||
try:
|
||||
from django.conf import settings
|
||||
|
@ -8,24 +9,100 @@ try:
|
|||
DEBUG=True,
|
||||
USE_TZ=True,
|
||||
DATABASES={
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.sqlite3",
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
}
|
||||
},
|
||||
ROOT_URLCONF="djangocms_blog.urls",
|
||||
INSTALLED_APPS=[
|
||||
"django.contrib.auth",
|
||||
"django.contrib.contenttypes",
|
||||
"django.contrib.sites",
|
||||
"djangocms_blog",
|
||||
TEMPLATE_CONTEXT_PROCESSORS=[
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'django.core.context_processors.i18n',
|
||||
'django.core.context_processors.debug',
|
||||
'django.core.context_processors.request',
|
||||
'django.core.context_processors.media',
|
||||
'django.core.context_processors.csrf',
|
||||
'cms.context_processors.cms_settings',
|
||||
'sekizai.context_processors.sekizai',
|
||||
'django.core.context_processors.static',
|
||||
],
|
||||
MIDDLEWARE_CLASSES=[
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.middleware.locale.LocaleMiddleware',
|
||||
'django.middleware.doc.XViewMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.cache.FetchFromCacheMiddleware',
|
||||
'cms.middleware.language.LanguageCookieMiddleware',
|
||||
'cms.middleware.user.CurrentUserMiddleware',
|
||||
'cms.middleware.page.CurrentPageMiddleware',
|
||||
'cms.middleware.toolbar.ToolbarMiddleware',
|
||||
],
|
||||
ROOT_URLCONF='tests.test_utils.urls',
|
||||
INSTALLED_APPS=[
|
||||
'django.contrib.auth',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sites',
|
||||
'cms',
|
||||
'django_nose',
|
||||
'menus',
|
||||
'mptt',
|
||||
'sekizai',
|
||||
'filer',
|
||||
'parler',
|
||||
'taggit',
|
||||
'djangocms_text_ckeditor',
|
||||
'cmsplugin_filer_image',
|
||||
'django_select2',
|
||||
'taggit_autosuggest',
|
||||
'djangocms_blog',
|
||||
'tests.test_utils',
|
||||
],
|
||||
LANGUAGE_CODE='en',
|
||||
LANGUAGES=(
|
||||
('en', gettext('English')),
|
||||
('fr', gettext('French')),
|
||||
('it', gettext('Italiano')),
|
||||
),
|
||||
CMS_LANGUAGES={
|
||||
1: [
|
||||
{
|
||||
'code': 'en',
|
||||
'name': gettext('English'),
|
||||
'public': True,
|
||||
},
|
||||
{
|
||||
'code': 'it',
|
||||
'name': gettext('Italiano'),
|
||||
'public': True,
|
||||
},
|
||||
{
|
||||
'code': 'fr',
|
||||
'name': gettext('French'),
|
||||
'public': True,
|
||||
},
|
||||
],
|
||||
'default': {
|
||||
'hide_untranslated': False,
|
||||
},
|
||||
},
|
||||
CMS_TEMPLATES=(
|
||||
('page.html', 'page'),
|
||||
),
|
||||
SITE_ID=1,
|
||||
NOSE_ARGS=['-s'],
|
||||
META_SITE_PROTOCOL='http',
|
||||
META_SITE_DOMAIN='example.com',
|
||||
META_USE_OG_PROPERTIES=True,
|
||||
META_USE_TWITTER_PROPERTIES=True,
|
||||
META_USE_GOOGLEPLUS_PROPERTIES=True,
|
||||
)
|
||||
|
||||
from django_nose import NoseTestSuiteRunner
|
||||
except ImportError:
|
||||
raise ImportError("To fix this error, run: pip install -r requirements-test.txt")
|
||||
raise ImportError('To fix this error, run: pip install -r requirements-test.txt')
|
||||
|
||||
|
||||
def run_tests(*test_args):
|
||||
|
|
2
setup.py
2
setup.py
|
@ -45,6 +45,8 @@ setup(
|
|||
'django-taggit-templatetags',
|
||||
'django-taggit-autosuggest',
|
||||
'django-admin-enhancer',
|
||||
'djangocms-text-ckeditor',
|
||||
'cmsplugin-filer-image',
|
||||
'django-meta-mixin',
|
||||
],
|
||||
license="BSD",
|
||||
|
|
Loading…
Reference in a new issue