diff options
| author | Tim Graham <timograham@gmail.com> | 2017-01-19 08:50:28 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-19 08:50:28 -0500 |
| commit | 5320fa77c3b2bc02ac232c3e0f5279d99a528e6a (patch) | |
| tree | 34da130e2b96cdedecff09122e20362f312a1b28 /tests/staticfiles_tests | |
| parent | 7d200949968002d2c2b4390953e8bda7153a49c9 (diff) | |
Refs #23919 -- Removed obsolete contextlib.closing() calls (for Python 2).
Diffstat (limited to 'tests/staticfiles_tests')
| -rw-r--r-- | tests/staticfiles_tests/test_liveserver.py | 3 |
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.') |
