Import urllib3 on top-level
MODIFY
test/with_dummyserver/test_no_ssl.py
test/with_dummyserver/test_no_ssl.py
@@ -8,11 +8,11 @@ from ..test_no_ssl import TestWithoutSSL
from dummyserver.testcase import (
HTTPDummyServerTestCase, HTTPSDummyServerTestCase)
+import urllib3
+
class TestHTTPWithoutSSL(HTTPDummyServerTestCase, TestWithoutSSL):
def test_simple(self):
- import urllib3
-
pool = urllib3.HTTPConnectionPool(self.host, self.port)
self.addCleanup(pool.close)
r = pool.request('GET', '/')
@@ -21,8 +21,6 @@ class TestHTTPWithoutSSL(HTTPDummyServerTestCase, TestWithoutSSL):
class TestHTTPSWithoutSSL(HTTPSDummyServerTestCase, TestWithoutSSL):
def test_simple(self):
- import urllib3
-
pool = urllib3.HTTPSConnectionPool(self.host, self.port)
self.addCleanup(pool.close)
try:

Import urllib3 on top-level