diff options
author | David Evans <d@evans.io> | 2016-04-03 14:43:51 +0100 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-04-04 10:12:41 -0400 |
commit | 99bb7fcc1859615a7b8c2468e7b97d54853bfb10 (patch) | |
tree | 0a29d604e71f8ac1de258ca1b641199a3294cc2d /tests/handlers | |
parent | 23aa700b788e073e6efc4585425c0bd6d3092569 (diff) | |
download | django-99bb7fcc1859615a7b8c2468e7b97d54853bfb10.tar.gz |
Fixed #26452 -- Loaded middleware on server start rather than on first request.
Diffstat (limited to 'tests/handlers')
-rw-r--r-- | tests/handlers/tests.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/handlers/tests.py b/tests/handlers/tests.py index 98919e4907..a3f3ec7f70 100644 --- a/tests/handlers/tests.py +++ b/tests/handlers/tests.py @@ -20,19 +20,9 @@ class HandlerTests(SimpleTestCase): def tearDown(self): request_started.connect(close_old_connections) - # Mangle settings so the handler will fail - @override_settings(MIDDLEWARE_CLASSES=42) - def test_lock_safety(self): - """ - Tests for bug #11193 (errors inside middleware shouldn't leave - the initLock locked). - """ - # Try running the handler, it will fail in load_middleware + def test_middleware_initialized(self): handler = WSGIHandler() - self.assertEqual(handler.initLock.locked(), False) - with self.assertRaises(Exception): - handler(None, None) - self.assertEqual(handler.initLock.locked(), False) + self.assertIsNotNone(handler._request_middleware) def test_bad_path_info(self): """Tests for bug #15672 ('request' referenced before assignment)""" |