Loading tests/httpwrappers/tests.py +1 −5 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ import json import os import pickle import unittest import warnings from django.core.exceptions import SuspiciousOperation from django.core.serializers.json import DjangoJSONEncoder Loading @@ -18,7 +17,6 @@ from django.http import (QueryDict, HttpResponse, HttpResponseRedirect, SimpleCookie, BadHeaderError, JsonResponse, parse_cookie) from django.test import TestCase from django.utils.deprecation import RemovedInDjango18Warning from django.utils.encoding import smart_str, force_text from django.utils.functional import lazy from django.utils._os import upath Loading Loading @@ -561,8 +559,6 @@ class FileCloseTests(TestCase): file1 = open(filename) r = HttpResponse(file1) self.assertFalse(file1.closed) with warnings.catch_warnings(): warnings.simplefilter("ignore", RemovedInDjango18Warning) list(r) self.assertFalse(file1.closed) r.close() Loading Loading
tests/httpwrappers/tests.py +1 −5 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ import json import os import pickle import unittest import warnings from django.core.exceptions import SuspiciousOperation from django.core.serializers.json import DjangoJSONEncoder Loading @@ -18,7 +17,6 @@ from django.http import (QueryDict, HttpResponse, HttpResponseRedirect, SimpleCookie, BadHeaderError, JsonResponse, parse_cookie) from django.test import TestCase from django.utils.deprecation import RemovedInDjango18Warning from django.utils.encoding import smart_str, force_text from django.utils.functional import lazy from django.utils._os import upath Loading Loading @@ -561,8 +559,6 @@ class FileCloseTests(TestCase): file1 = open(filename) r = HttpResponse(file1) self.assertFalse(file1.closed) with warnings.catch_warnings(): warnings.simplefilter("ignore", RemovedInDjango18Warning) list(r) self.assertFalse(file1.closed) r.close() Loading