From 494cd857c897dc4051193abc10d181fa51de4966 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Tue, 21 Oct 2014 18:32:46 -0400 Subject: [PATCH] Fixed #23653 -- Fixed Windows failure of a logging test added in refs #23569. --- tests/logging_tests/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/logging_tests/tests.py b/tests/logging_tests/tests.py index 8a76c0ec49..71368cc9c3 100644 --- a/tests/logging_tests/tests.py +++ b/tests/logging_tests/tests.py @@ -2,10 +2,10 @@ from __future__ import unicode_literals import logging -import tempfile import warnings from django.core import mail +from django.core.files.temp import NamedTemporaryFile from django.test import TestCase, RequestFactory, override_settings from django.test.utils import patch_logger from django.utils.encoding import force_text @@ -433,7 +433,7 @@ args=(sys.stdout,) [formatter_simple] format=%(message)s """ - self.temp_file = tempfile.NamedTemporaryFile() + self.temp_file = NamedTemporaryFile() self.temp_file.write(logging_conf.encode('utf-8')) self.temp_file.flush() sdict = {'LOGGING_CONFIG': '"logging.config.fileConfig"',