From f0a84112ba1c9b253ebbcbd5d6942f01a7bee9d3 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 8 Feb 2016 11:14:27 -0500 Subject: [PATCH] Refs #25684 -- Silenced logging output in servers tests. --- tests/servers/test_basehttp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/servers/test_basehttp.py b/tests/servers/test_basehttp.py index 2d57d7c257c..239016e635c 100644 --- a/tests/servers/test_basehttp.py +++ b/tests/servers/test_basehttp.py @@ -5,7 +5,7 @@ from django.core.handlers.wsgi import WSGIRequest from django.core.servers.basehttp import WSGIRequestHandler from django.test import SimpleTestCase from django.test.client import RequestFactory -from django.test.utils import captured_stderr, patch_logger +from django.test.utils import patch_logger class Stub(object): @@ -105,7 +105,7 @@ class WSGIRequestHandlerTestCase(SimpleTestCase): server = Stub(base_environ={}, get_app=lambda: test_app) # We don't need to check stderr, but we don't want it in test output - with captured_stderr(): + with patch_logger('django.server', 'info'): # instantiating a handler runs the request as side effect WSGIRequestHandler(request, '192.168.0.2', server)