summaryrefslogtreecommitdiff
path: root/tests/validators
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2017-01-18 22:05:41 +0100
committerTim Graham <timograham@gmail.com>2017-01-18 21:45:12 -0500
commita5563963397aeee30c32e3c1dab31bfe453ca89f (patch)
tree6fe111ef4ea95da191037341729c7d39b87c07d7 /tests/validators
parenteb422e476f3c0070dbf200bd62d97d12150c6fd9 (diff)
downloaddjango-a5563963397aeee30c32e3c1dab31bfe453ca89f.tar.gz
Refs #23919 -- Replaced io.open() with open().
io.open() is an alias for open() on Python 3.
Diffstat (limited to 'tests/validators')
-rw-r--r--tests/validators/tests.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/validators/tests.py b/tests/validators/tests.py
index d5fb2215ca..2f26efcaa5 100644
--- a/tests/validators/tests.py
+++ b/tests/validators/tests.py
@@ -1,4 +1,3 @@
-import io
import os
import re
import types
@@ -269,10 +268,10 @@ def create_path(filename):
# Add valid and invalid URL tests.
# This only tests the validator without extended schemes.
-with io.open(create_path('valid_urls.txt'), encoding='utf8') as f:
+with open(create_path('valid_urls.txt'), encoding='utf8') as f:
for url in f:
TEST_DATA.append((URLValidator(), url.strip(), None))
-with io.open(create_path('invalid_urls.txt'), encoding='utf8') as f:
+with open(create_path('invalid_urls.txt'), encoding='utf8') as f:
for url in f:
TEST_DATA.append((URLValidator(), url.strip(), ValidationError))