]> granicus.if.org Git - python/commitdiff
#17472: add tests for a couple of untested methods in urllib.urlparse.
authorR David Murray <rdmurray@bitdance.com>
Fri, 22 Mar 2013 00:56:51 +0000 (20:56 -0400)
committerR David Murray <rdmurray@bitdance.com>
Fri, 22 Mar 2013 00:56:51 +0000 (20:56 -0400)
Original patch by Daniel Wozniak.

Lib/test/test_urlparse.py

index 378a427bc56194f34b1d7bc76044f31a7d9cb651..c938f09951af2fee4595213577e648d4077d96d3 100755 (executable)
@@ -847,6 +847,14 @@ class UrlParseTestCase(unittest.TestCase):
         self.assertEqual(p1.path, '863-1234')
         self.assertEqual(p1.params, 'phone-context=+1-914-555')
 
+    def test_unwrap(self):
+        url = urllib.parse.unwrap('<URL:type://host/path>')
+        self.assertEqual(url, 'type://host/path')
+
+    def test_Quoter_repr(self):
+        quoter = urllib.parse.Quoter(urllib.parse._ALWAYS_SAFE)
+        self.assertIn('Quoter', repr(quoter))
+
 
 def test_main():
     support.run_unittest(UrlParseTestCase)