summaryrefslogtreecommitdiff
blob: 71ed088edcb5cc23e65acfde6aaef2cb3b7dd868 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/tests/test_future/test_urllib_toplevel.py b/tests/test_future/test_urllib_toplevel.py
index 68bc4c9..923b2e8 100644
--- a/tests/test_future/test_urllib_toplevel.py
+++ b/tests/test_future/test_urllib_toplevel.py
@@ -120,7 +120,7 @@ class urlopen_FileTests(unittest.TestCase):
         finally:
             f.close()
         self.pathname = support.TESTFN
-        self.returned_obj = urlopen("file:%s" % self.pathname)
+        self.returned_obj = urlopen("file:%s" % urllib_parse.quote(self.pathname))
 
     def tearDown(self):
         """Shut down the open object"""
@@ -167,7 +167,7 @@ class urlopen_FileTests(unittest.TestCase):
         self.assertIsInstance(self.returned_obj.info(), email_message.Message)
 
     def test_geturl(self):
-        self.assertEqual(self.returned_obj.geturl(), self.pathname)
+        self.assertEqual(self.returned_obj.geturl(), urllib_parse.quote(self.pathname))
 
     def test_getcode(self):
         self.assertIsNone(self.returned_obj.getcode())