summaryrefslogtreecommitdiff
path: root/tests/staticfiles_tests/test_liveserver.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/staticfiles_tests/test_liveserver.py')
-rw-r--r--tests/staticfiles_tests/test_liveserver.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/staticfiles_tests/test_liveserver.py b/tests/staticfiles_tests/test_liveserver.py
index b3727bea12..717de5cf64 100644
--- a/tests/staticfiles_tests/test_liveserver.py
+++ b/tests/staticfiles_tests/test_liveserver.py
@@ -4,7 +4,6 @@ django.contrib.staticfiles.testing.StaticLiveServerTestCase instead of
django.test.LiveServerTestCase.
"""
-import contextlib
import os
from urllib.request import urlopen
@@ -86,5 +85,5 @@ class StaticLiveServerView(LiveServerBase):
StaticLiveServerTestCase use of staticfiles' serve() allows it
to discover app's static assets without having to collectstatic first.
"""
- with contextlib.closing(self.urlopen('/static/test/file.txt')) as f:
+ with self.urlopen('/static/test/file.txt') as f:
self.assertEqual(f.read().rstrip(b'\r\n'), b'In static directory.')