diff options
| author | Florian Apolloner <florian@apolloner.eu> | 2015-11-07 16:12:37 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-05-17 07:22:22 -0400 |
| commit | 9baf692a58de78dba13aa582098781675367c329 (patch) | |
| tree | 1926555441d0c3b13185782dce193b839d616a4a /tests/project_template | |
| parent | 05c888ffb843ba3eff06cd07b3cef5bbb513a54f (diff) | |
Fixed #26601 -- Improved middleware per DEP 0005.
Thanks Tim Graham for polishing the patch, updating the tests, and
writing documentation. Thanks Carl Meyer for shepherding the DEP.
Diffstat (limited to 'tests/project_template')
| -rw-r--r-- | tests/project_template/test_settings.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/project_template/test_settings.py b/tests/project_template/test_settings.py index 702ecec8c5..d153c4d95f 100644 --- a/tests/project_template/test_settings.py +++ b/tests/project_template/test_settings.py @@ -26,16 +26,16 @@ class TestStartProjectSettings(TestCase): shutil.copyfile(template_settings_py, test_settings_py) self.addCleanup(os.remove, test_settings_py) - def test_middleware_classes_headers(self): + def test_middleware_headers(self): """ - Ensure headers sent by the default MIDDLEWARE_CLASSES do not - inadvertently change. For example, we never want "Vary: Cookie" to - appear in the list since it prevents the caching of responses. + Ensure headers sent by the default MIDDLEWARE don't inadvertently + change. For example, we never want "Vary: Cookie" to appear in the list + since it prevents the caching of responses. """ - from django.conf.project_template.project_name.settings import MIDDLEWARE_CLASSES + from django.conf.project_template.project_name.settings import MIDDLEWARE with self.settings( - MIDDLEWARE_CLASSES=MIDDLEWARE_CLASSES, + MIDDLEWARE=MIDDLEWARE, ROOT_URLCONF='project_template.urls', ): response = self.client.get('/empty/') |
