tests/test-hgweb-auth.py
changeset 28883 032c4c2f802a
parent 28808 10c2ce44c35d
child 29377 2c019aac6b99
--- a/tests/test-hgweb-auth.py	Thu Apr 07 00:05:48 2016 +0000
+++ b/tests/test-hgweb-auth.py	Wed Apr 06 23:22:12 2016 +0000
@@ -1,7 +1,6 @@
 from __future__ import absolute_import, print_function
 
 from mercurial import demandimport; demandimport.enable()
-import urllib2
 from mercurial import (
     error,
     ui as uimod,
@@ -9,6 +8,9 @@
     util,
 )
 
+urlerr = util.urlerr
+urlreq = util.urlreq
+
 class myui(uimod.ui):
     def interactive(self):
         return False
@@ -104,7 +106,7 @@
 
 def testauthinfo(fullurl, authurl):
     print('URIs:', fullurl, authurl)
-    pm = urllib2.HTTPPasswordMgrWithDefaultRealm()
+    pm = urlreq.httppasswordmgrwithdefaultrealm()
     pm.add_password(*util.url(fullurl).authinfo()[1])
     print(pm.find_user_password('test', authurl))