diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-30 07:22:54 (GMT) |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2010-01-30 07:22:54 (GMT) |
| commit | a2d465374099c582ef9bc042c2fe1be4776ee641 (patch) | |
| tree | f1740160c63e081382daea49b1dee4a1eb9b8433 /Lib/test/test_urllib2_localnet.py | |
| parent | 75d3fb1ebb13b143b2840b761b736237bf48f714 (diff) | |
| download | cpython-a2d465374099c582ef9bc042c2fe1be4776ee641.zip cpython-a2d465374099c582ef9bc042c2fe1be4776ee641.tar.gz cpython-a2d465374099c582ef9bc042c2fe1be4776ee641.tar.bz2 | |
#7092: silence py3k warnings for deprecated modules
Diffstat (limited to 'Lib/test/test_urllib2_localnet.py')
| -rw-r--r-- | Lib/test/test_urllib2_localnet.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_urllib2_localnet.py b/Lib/test/test_urllib2_localnet.py index 5d65b6e..e2c1789 100644 --- a/Lib/test/test_urllib2_localnet.py +++ b/Lib/test/test_urllib2_localnet.py @@ -1,6 +1,5 @@ #!/usr/bin/env python -import mimetools import threading import urlparse import urllib2 @@ -8,6 +7,7 @@ import BaseHTTPServer import unittest import hashlib from test import test_support +mimetools = test_support.import_module('mimetools', deprecated=True) # Loopback http server infrastructure @@ -154,13 +154,13 @@ class DigestAuthHandler: if len(self._users) == 0: return True - if not request_handler.headers.has_key('Proxy-Authorization'): + if 'Proxy-Authorization' not in request_handler.headers: return self._return_auth_challenge(request_handler) else: auth_dict = self._create_auth_dict( request_handler.headers['Proxy-Authorization'] ) - if self._users.has_key(auth_dict["username"]): + if auth_dict["username"] in self._users: password = self._users[ auth_dict["username"] ] else: return self._return_auth_challenge(request_handler) |
