summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2005-09-10 14:30:09 (GMT)
committerRaymond Hettinger <python@rcn.com>2005-09-10 14:30:09 (GMT)
commit2bdec7bfb0b200db64c7170c0aebdf2aa5356167 (patch)
tree6382e769b89b016697fc81011b5d5da987dad8c1 /Lib/test/test_urllib.py
parent803ce801ab84c2e11a99dc160512cd905c0b6520 (diff)
downloadcpython-2bdec7bfb0b200db64c7170c0aebdf2aa5356167.zip
cpython-2bdec7bfb0b200db64c7170c0aebdf2aa5356167.tar.gz
cpython-2bdec7bfb0b200db64c7170c0aebdf2aa5356167.tar.bz2
Revert 1.170. Add tests.
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r--Lib/test/test_urllib.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index 3621476..94f0f9e 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -353,6 +353,12 @@ class QuotingTests(unittest.TestCase):
self.assertEqual(expect, result,
"using quote_plus(): %s != %s" % (expect, result))
+ def test_quoting_plus(self):
+ self.assertEqual(urllib.quote_plus('alpha+beta gamma'),
+ 'alpha%2Bbeta+gamma')
+ self.assertEqual(urllib.quote_plus('alpha+beta gamma', '+'),
+ 'alpha+beta+gamma')
+
class UnquotingTests(unittest.TestCase):
"""Tests for unquote() and unquote_plus()