Separate `tests` and `testproject`

This commit is contained in:
Aarni Koskela 2016-09-07 08:48:13 +03:00
parent c55dff356b
commit 264f447916
10 changed files with 10 additions and 13 deletions

View File

@ -2,5 +2,4 @@
universal = 1
[tool:pytest]
DJANGO_SETTINGS_MODULE = tests.settings
norecursedirs = .git .tox .eggs .cache htmlcov venv*
DJANGO_SETTINGS_MODULE = testproject.settings

View File

@ -1,11 +1,11 @@
import os
import pkg_resources
SECRET_KEY = 'x'
USE_I18N = True
ROOT_URLCONF = 'tests.urls'
ROOT_URLCONF = 'testproject.urls'
INSTALLED_APPS = [
'django_babel',
'tests',
'testproject',
]
MIDDLEWARE_CLASSES = [
'django.middleware.locale.LocaleMiddleware',
@ -24,5 +24,5 @@ TEMPLATES = [
},
]
LOCALE_PATHS = [
os.path.join(os.path.dirname(__file__), 'locale'),
pkg_resources.resource_filename(__name__, 'locale'),
]

View File

@ -1 +1 @@
[django: templates/**.*]
[django: **/templates/**.*]

View File

@ -1,11 +1,9 @@
import os
import pkg_resources
from django.core.management import call_command
TEST_LOCALE_DIR = os.path.join(
os.path.dirname(__file__),
'locale',
)
TEST_LOCALE_DIR = pkg_resources.resource_filename('testproject', 'locale')
def test_babel_compilemessages():
@ -25,7 +23,7 @@ def test_babel_makemessages():
'babel',
'makemessages',
'-l', 'en',
'-F', os.path.join(os.path.dirname(__file__), 'babel.cfg'),
'-F', pkg_resources.resource_filename(__name__, 'babel.cfg'),
)
# See that the expected files get populated with the discovered message
for path in [

View File

@ -1,5 +1,5 @@
[tox]
envlist = {py27,py34}-django{18,19,110,master}, py33-django18, lint, docs
envlist = {py27,py34,py35}-django{18,19,110,master}, py33-django18, lint, docs
[testenv]
deps =