summaryrefslogtreecommitdiff
path: root/tests/logging_tests/tests.py
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2016-04-14 08:12:35 -0700
committerTim Graham <timograham@gmail.com>2016-04-20 21:02:05 -0400
commit40b69607c751c4afa453edfd41d2ed155e58187e (patch)
treef1c4354073569aff25271f3d497183e302b88058 /tests/logging_tests/tests.py
parent5e00b14403db75d83a274864ecd008d0e826c61d (diff)
Fixed #26504 -- Avoided logging "Not Found" warnings if a middleware handles the 404.
For example, this avoids a warning in the case of a request that's redirected to a language-prefixed URL by LocaleMiddleware.
Diffstat (limited to 'tests/logging_tests/tests.py')
-rw-r--r--tests/logging_tests/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/logging_tests/tests.py b/tests/logging_tests/tests.py
index 22a059cb0d..b9845ea719 100644
--- a/tests/logging_tests/tests.py
+++ b/tests/logging_tests/tests.py
@@ -133,6 +133,11 @@ class HandlerLoggingTests(SetupDefaultLoggingMixin, LoggingCaptureMixin, SimpleT
)
class I18nLoggingTests(SetupDefaultLoggingMixin, LoggingCaptureMixin, SimpleTestCase):
+ def test_i18n_page_found_no_warning(self):
+ self.client.get('/exists/')
+ self.client.get('/en/exists/')
+ self.assertEqual(self.logger_output.getvalue(), '')
+
def test_i18n_page_not_found_warning(self):
self.client.get('/this_does_not/')
self.client.get('/en/nor_this/')