mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
#7092: Silence more py3k warnings. Patch by Florent Xicluna.
This commit is contained in:
parent
17ae2ba78f
commit
dde5b94875
39 changed files with 102 additions and 85 deletions
|
@ -432,10 +432,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.assertTrue(env.has_key(k))
|
||||
self.assertIn(k, env)
|
||||
|
||||
def testEnviron(self):
|
||||
h = TestHandler(X="Y")
|
||||
|
@ -448,7 +448,7 @@ class HandlerTests(TestCase):
|
|||
h = BaseCGIHandler(None,None,None,{})
|
||||
h.setup_environ()
|
||||
for key in 'wsgi.url_scheme', 'wsgi.input', 'wsgi.errors':
|
||||
self.assertTrue(h.environ.has_key(key))
|
||||
self.assertIn(key, h.environ)
|
||||
|
||||
def testScheme(self):
|
||||
h=TestHandler(HTTPS="on"); h.setup_environ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue