Mercurial > public > mercurial-scm > hg-stable
diff tests/test-hgweb-auth.py @ 28883:032c4c2f802a
pycompat: switch to util.urlreq/util.urlerr for py3 compat
author | timeless <timeless@mozdev.org> |
---|---|
date | Wed, 06 Apr 2016 23:22:12 +0000 |
parents | 10c2ce44c35d |
children | 2c019aac6b99 |
line wrap: on
line diff
--- 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))