mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed some unclosed objects in tests
This commit is contained in:
committed by
Tim Graham
parent
69483e022a
commit
b40c551fdf
@@ -633,7 +633,8 @@ class GZipMiddlewareTest(SimpleTestCase):
|
||||
|
||||
@staticmethod
|
||||
def decompress(gzipped_string):
|
||||
return gzip.GzipFile(mode='rb', fileobj=BytesIO(gzipped_string)).read()
|
||||
with gzip.GzipFile(mode='rb', fileobj=BytesIO(gzipped_string)) as f:
|
||||
return f.read()
|
||||
|
||||
def test_compress_response(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user