summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_wsgiref.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-18 22:13:04 (GMT)
committerGuido van Rossum <guido@python.org>2006-08-18 22:13:04 (GMT)
commite2b70bcf7401477936fba99a8bf4a1f759ecc8a3 (patch)
tree4c9b65b7fd8c26a3d2f1b64ecd6b4c72a756b4b2 /Lib/test/test_wsgiref.py
parentd2dbecb4ae9177e2e87adcb047147c6bcbf28cc1 (diff)
downloadcpython-e2b70bcf7401477936fba99a8bf4a1f759ecc8a3.zip
cpython-e2b70bcf7401477936fba99a8bf4a1f759ecc8a3.tar.gz
cpython-e2b70bcf7401477936fba99a8bf4a1f759ecc8a3.tar.bz2
Get rid of dict.has_key(). Boy this has a lot of repercussions!
Not all code has been fixed yet; this is just a checkpoint... The C API still has PyDict_HasKey() and _HasKeyString(); not sure if I want to change those just yet.
Diffstat (limited to 'Lib/test/test_wsgiref.py')
-rwxr-xr-xLib/test/test_wsgiref.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_wsgiref.py b/Lib/test/test_wsgiref.py
index 1ec271b..b42f437 100755
--- a/Lib/test/test_wsgiref.py
+++ b/Lib/test/test_wsgiref.py
@@ -341,7 +341,7 @@ class HeaderTests(TestCase):
del h['foo'] # should not raise an error
h['Foo'] = 'bar'
- for m in h.has_key, h.__contains__, h.get, h.get_all, h.__getitem__:
+ for m in h.__contains__, h.get, h.get_all, h.__getitem__:
self.failUnless(m('foo'))
self.failUnless(m('Foo'))
self.failUnless(m('FOO'))
@@ -424,10 +424,10 @@ class HandlerTests(TestCase):
env = handler.environ
from os import environ
for k,v in environ.items():
- if not empty.has_key(k):
+ if k not in empty:
self.assertEqual(env[k],v)
for k,v in empty.items():
- self.failUnless(env.has_key(k))
+ self.failUnless(k in env)
def testEnviron(self):
h = TestHandler(X="Y")
@@ -440,7 +440,7 @@ class HandlerTests(TestCase):
h = BaseCGIHandler(None,None,None,{})
h.setup_environ()
for key in 'wsgi.url_scheme', 'wsgi.input', 'wsgi.errors':
- self.assert_(h.environ.has_key(key))
+ self.assert_(key in h.environ)
def testScheme(self):
h=TestHandler(HTTPS="on"); h.setup_environ()