summaryrefslogtreecommitdiff
path: root/tests/servers
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-09-05 14:38:59 -0500
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-09-05 14:39:23 -0500
commit6a6428a36f221446b17eaf4876e92d3db1781962 (patch)
treea57290e315203b770a56b0d4691ee2d4d104cccc /tests/servers
parented9cd4fd8b425ab5010b27aefc7ef6e50d55fb54 (diff)
Took advantage of django.utils.six.moves.urllib.*.
Diffstat (limited to 'tests/servers')
-rw-r--r--tests/servers/tests.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/servers/tests.py b/tests/servers/tests.py
index 86b8a4c6c9..f833570862 100644
--- a/tests/servers/tests.py
+++ b/tests/servers/tests.py
@@ -5,16 +5,14 @@ Tests for django.core.servers.
from __future__ import unicode_literals
import os
-try:
- from urllib.request import urlopen, HTTPError
-except ImportError: # Python 2
- from urllib2 import urlopen, HTTPError
from django.core.exceptions import ImproperlyConfigured
from django.test import LiveServerTestCase
from django.core.servers.basehttp import WSGIServerException
from django.test.utils import override_settings
from django.utils.http import urlencode
+from django.utils.six.moves.urllib.error import HTTPError
+from django.utils.six.moves.urllib.request import urlopen
from django.utils._os import upath
from .models import Person