mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Refs #26601 -- Added various middlewares tests for deprecation of passing None as get_response.
This commit is contained in:
committed by
Mariusz Felisiak
parent
abbdd3a622
commit
68d7cf4054
@@ -90,8 +90,9 @@ ALWAYS_MIDDLEWARE = [
|
||||
# avoid "RuntimeError: Model class X doesn't declare an explicit app_label
|
||||
# and isn't in an application in INSTALLED_APPS."
|
||||
CONTRIB_TESTS_TO_APPS = {
|
||||
'flatpages_tests': 'django.contrib.flatpages',
|
||||
'redirects_tests': 'django.contrib.redirects',
|
||||
'deprecation': ['django.contrib.flatpages', 'django.contrib.redirects'],
|
||||
'flatpages_tests': ['django.contrib.flatpages'],
|
||||
'redirects_tests': ['django.contrib.redirects'],
|
||||
}
|
||||
|
||||
|
||||
@@ -228,7 +229,9 @@ def setup(verbosity, test_labels, parallel, start_at, start_after):
|
||||
)
|
||||
|
||||
if module_name in CONTRIB_TESTS_TO_APPS and module_found_in_labels:
|
||||
settings.INSTALLED_APPS.append(CONTRIB_TESTS_TO_APPS[module_name])
|
||||
for contrib_app in CONTRIB_TESTS_TO_APPS[module_name]:
|
||||
if contrib_app not in settings.INSTALLED_APPS:
|
||||
settings.INSTALLED_APPS.append(contrib_app)
|
||||
|
||||
if module_found_in_labels and module_label not in installed_app_names:
|
||||
if verbosity >= 2:
|
||||
|
||||
Reference in New Issue
Block a user