Changed settings_sqlitetest so that local developer additions to context processors and middleware classes are avoided.
- Legacy-Id: 12723
This commit is contained in:
parent
6f5c0fdd23
commit
79c44d25ea
|
@ -48,3 +48,8 @@ NOMCOM_PUBLIC_KEYS_DIR=os.path.abspath("tmp-nomcom-public-keys-dir")
|
||||||
MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR), 'test/media/') # pyflakes:ignore
|
MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR), 'test/media/') # pyflakes:ignore
|
||||||
MEDIA_URL = '/test/media/'
|
MEDIA_URL = '/test/media/'
|
||||||
PHOTOS_DIR = MEDIA_ROOT + PHOTOS_DIRNAME # pyflakes:ignore
|
PHOTOS_DIR = MEDIA_ROOT + PHOTOS_DIRNAME # pyflakes:ignore
|
||||||
|
|
||||||
|
# Undo any developer-dependent middleware when running the tests
|
||||||
|
MIDDLEWARE_CLASSES = [ c for c in MIDDLEWARE_CLASSES if not c in DEV_MIDDLEWARE_CLASSES ] # pyflakes:ignore
|
||||||
|
|
||||||
|
TEMPLATES[0]['OPTIONS']['context_processors'] = [ p for p in TEMPLATES[0]['OPTIONS']['context_processors'] if not p in DEV_TEMPLATE_CONTEXT_PROCESSORS ] # pyflakes:ignore
|
||||||
|
|
|
@ -396,7 +396,7 @@ class IetfTestRunner(DiscoverRunner):
|
||||||
|
|
||||||
settings.TEMPLATES[0]['OPTIONS']['loaders'] = ('ietf.utils.test_runner.TemplateCoverageLoader',) + settings.TEMPLATES[0]['OPTIONS']['loaders']
|
settings.TEMPLATES[0]['OPTIONS']['loaders'] = ('ietf.utils.test_runner.TemplateCoverageLoader',) + settings.TEMPLATES[0]['OPTIONS']['loaders']
|
||||||
|
|
||||||
settings.MIDDLEWARE_CLASSES = ('ietf.utils.test_runner.RecordUrlsMiddleware',) + settings.MIDDLEWARE_CLASSES
|
settings.MIDDLEWARE_CLASSES = ('ietf.utils.test_runner.RecordUrlsMiddleware',) + tuple(settings.MIDDLEWARE_CLASSES)
|
||||||
url_coverage_collection = True
|
url_coverage_collection = True
|
||||||
|
|
||||||
self.code_coverage_checker = settings.TEST_CODE_COVERAGE_CHECKER
|
self.code_coverage_checker = settings.TEST_CODE_COVERAGE_CHECKER
|
||||||
|
|
Loading…
Reference in a new issue