mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-05-15 08:23:09 +00:00
Optimize testrunner.
Since LANGUAGES setting is overridden in tests, there is no need to use them all in pre-test database creation (because database would be rebuild anyway and only time is wasted).
This commit is contained in:
parent
fef3109e60
commit
eeb800aa1e
1 changed files with 4 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ import sys
|
|||
from django.conf import settings
|
||||
from django.core.management import call_command
|
||||
|
||||
|
||||
def runtests():
|
||||
if not settings.configured:
|
||||
# Choose database for settings
|
||||
|
|
@ -38,6 +39,9 @@ def runtests():
|
|||
'modeltranslation',
|
||||
),
|
||||
ROOT_URLCONF = None, # tests override urlconf, but it still needs to be defined
|
||||
LANGUAGES = (
|
||||
('en', 'English'),
|
||||
),
|
||||
)
|
||||
|
||||
failures = call_command(
|
||||
|
|
|
|||
Loading…
Reference in a new issue