django-modeltranslation/modeltranslation/tests/settings.py
Michal Arbet 7e6f912c6f Fix failing tests when local migrations are used (Fixes: #527).
The following tests issues are adressed in this patch:

- Settings are changed so that local tests.auth_migrations are used
  instead of django.contrib.auth.migrations
- Distributed django.contrib.auth.migrations are copied to
  tests.auth_migrations for tests
- All migrations are deleted from tests.auth_migrations on teardown
2019-11-13 13:25:59 +01:00

26 lines
566 B
Python

# -*- coding: utf-8 -*-
"""
Settings overrided for test time
"""
from django.conf import settings
INSTALLED_APPS = tuple(settings.INSTALLED_APPS) + (
'modeltranslation.tests',
)
LANGUAGES = (('de', 'Deutsch'),
('en', 'English'))
LANGUAGE_CODE = 'de'
MODELTRANSLATION_DEFAULT_LANGUAGE = 'de'
USE_I18N = True
USE_TZ = False
MIDDLEWARE_CLASSES = ()
MODELTRANSLATION_AUTO_POPULATE = False
MODELTRANSLATION_FALLBACK_LANGUAGES = ()
ROOT_URLCONF = 'modeltranslation.tests.urls'
MIGRATION_MODULES = {'auth': 'modeltranslation.tests.auth_migrations'}