From 104ee2fdae7fcd402396c709c91f5c84de6e4165 Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Fri, 17 Jun 2016 09:42:07 -0700 Subject: [PATCH] Moved old-middleware tests in preparation for adding new tests. --- tests/middleware_exceptions/{tests.py => test_legacy.py} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename tests/middleware_exceptions/{tests.py => test_legacy.py} (99%) diff --git a/tests/middleware_exceptions/tests.py b/tests/middleware_exceptions/test_legacy.py similarity index 99% rename from tests/middleware_exceptions/tests.py rename to tests/middleware_exceptions/test_legacy.py index 22925a8500..6aab3782d8 100644 --- a/tests/middleware_exceptions/tests.py +++ b/tests/middleware_exceptions/test_legacy.py @@ -916,24 +916,24 @@ class MiddlewareNotUsedTests(SimpleTestCase): with self.assertRaises(MiddlewareNotUsed): MyMiddleware().process_request(request) - @override_settings(MIDDLEWARE=['middleware_exceptions.tests.MyMiddleware']) + @override_settings(MIDDLEWARE=['middleware_exceptions.test_legacy.MyMiddleware']) def test_log(self): with patch_logger('django.request', 'debug') as calls: self.client.get('/middleware_exceptions/view/') self.assertEqual(len(calls), 1) self.assertEqual( calls[0], - "MiddlewareNotUsed: 'middleware_exceptions.tests.MyMiddleware'" + "MiddlewareNotUsed: 'middleware_exceptions.test_legacy.MyMiddleware'" ) - @override_settings(MIDDLEWARE=['middleware_exceptions.tests.MyMiddlewareWithExceptionMessage']) + @override_settings(MIDDLEWARE=['middleware_exceptions.test_legacy.MyMiddlewareWithExceptionMessage']) def test_log_custom_message(self): with patch_logger('django.request', 'debug') as calls: self.client.get('/middleware_exceptions/view/') self.assertEqual(len(calls), 1) self.assertEqual( calls[0], - "MiddlewareNotUsed('middleware_exceptions.tests.MyMiddlewareWithExceptionMessage'): spam eggs" + "MiddlewareNotUsed('middleware_exceptions.test_legacy.MyMiddlewareWithExceptionMessage'): spam eggs" ) @override_settings(DEBUG=False)