mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed some unclosed objects in tests
This commit is contained in:
parent
69483e022a
commit
b40c551fdf
5 changed files with 25 additions and 18 deletions
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue