mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
use assert[Not]In where appropriate
This commit is contained in:
parent
0f77f465ff
commit
b58e0bd8bb
39 changed files with 176 additions and 173 deletions
|
@ -1027,10 +1027,10 @@ class HandlerTests(unittest.TestCase):
|
|||
# Verify Proxy-Authorization gets tunneled to request.
|
||||
# httpsconn req_headers do not have the Proxy-Authorization header but
|
||||
# the req will have.
|
||||
self.assertFalse(("Proxy-Authorization","FooBar") in
|
||||
self.assertNotIn(("Proxy-Authorization","FooBar"),
|
||||
https_handler.httpconn.req_headers)
|
||||
self.assertTrue(("User-Agent","Grail") in
|
||||
https_handler.httpconn.req_headers)
|
||||
self.assertIn(("User-Agent","Grail"),
|
||||
https_handler.httpconn.req_headers)
|
||||
self.assertIsNotNone(req._tunnel_host)
|
||||
self.assertEqual(req.get_host(), "proxy.example.com:3128")
|
||||
self.assertEqual(req.get_header("Proxy-authorization"),"FooBar")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue