urllib3: add a test to verify that providing http_auth as a list works
This commit is contained in:
committed by
Honza Kral
parent
1a9fd9e105
commit
6a0f5c7646
@@ -34,6 +34,10 @@ class TestUrllib3Connection(TestCase):
|
||||
con = Urllib3HttpConnection(http_auth=('username', 'secret'))
|
||||
self.assertEquals({'authorization': 'Basic dXNlcm5hbWU6c2VjcmV0'}, con.pool.headers)
|
||||
|
||||
def test_http_auth_list(self):
|
||||
con = Urllib3HttpConnection(http_auth=['username', 'secret'])
|
||||
self.assertEquals({'authorization': 'Basic dXNlcm5hbWU6c2VjcmV0'}, con.pool.headers)
|
||||
|
||||
def test_uses_https_if_specified(self):
|
||||
con = Urllib3HttpConnection(use_ssl=True)
|
||||
self.assertIsInstance(con.pool, urllib3.HTTPSConnectionPool)
|
||||
|
||||
Reference in New Issue
Block a user