Separate `tests` and `testproject`
This commit is contained in:
parent
c55dff356b
commit
264f447916
|
@ -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
|
||||
|
|
|
@ -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'),
|
||||
]
|
|
@ -1 +1 @@
|
|||
[django: templates/**.*]
|
||||
[django: **/templates/**.*]
|
||||
|
|
|
@ -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 [
|
||||
|
|
Loading…
Reference in New Issue