libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [13/33] libcloud git commit: Refactor all the unit tests to only have 1 mock connection class and use Connection.conn_class instead of Connection.conn_classes (tuple)
Date Tue, 05 Apr 2016 11:17:04 GMT
Refactor all the unit tests to only have 1 mock connection class and use Connection.conn_class instead of Connection.conn_classes (tuple)


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/6fd28b6b
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/6fd28b6b
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/6fd28b6b

Branch: refs/heads/requests
Commit: 6fd28b6bac34d5065c3898accdcb4ecf0a1101e7
Parents: de1176e
Author: anthony-shaw <anthony.p.shaw@gmail.com>
Authored: Tue Mar 29 20:57:51 2016 +1100
Committer: anthony-shaw <anthony.p.shaw@gmail.com>
Committed: Tue Mar 29 20:57:51 2016 +1100

----------------------------------------------------------------------
 libcloud/common/base.py                         |  4 +++
 libcloud/common/openstack_identity.py           |  2 +-
 libcloud/test/backup/test_dimensiondata.py      |  2 +-
 libcloud/test/common/test_cloudstack.py         |  2 +-
 libcloud/test/common/test_digitalocean_v1.py    |  4 +--
 libcloud/test/common/test_digitalocean_v2.py    |  4 +--
 libcloud/test/common/test_google.py             |  9 ++----
 libcloud/test/common/test_openstack.py          |  6 ++--
 libcloud/test/common/test_openstack_identity.py | 10 +++----
 libcloud/test/compute/test_abiquo.py            |  4 +--
 libcloud/test/compute/test_azure.py             |  2 +-
 libcloud/test/compute/test_bluebox.py           |  2 +-
 libcloud/test/compute/test_brightbox.py         |  3 +-
 libcloud/test/compute/test_cloudsigma_v1_0.py   |  3 +-
 libcloud/test/compute/test_cloudsigma_v2_0.py   |  3 +-
 libcloud/test/compute/test_cloudstack.py        |  3 +-
 libcloud/test/compute/test_deployment.py        |  2 +-
 libcloud/test/compute/test_digitalocean_v1.py   |  4 +--
 libcloud/test/compute/test_digitalocean_v2.py   |  4 +--
 libcloud/test/compute/test_dimensiondata.py     |  2 +-
 libcloud/test/compute/test_ec2.py               | 10 +++----
 libcloud/test/compute/test_ecp.py               |  3 +-
 libcloud/test/compute/test_ecs.py               |  2 +-
 libcloud/test/compute/test_elasticstack.py      |  9 ++----
 libcloud/test/compute/test_gandi.py             |  6 ++--
 libcloud/test/compute/test_gce.py               |  5 ++--
 libcloud/test/compute/test_gogrid.py            |  2 +-
 libcloud/test/compute/test_gridspot.py          |  5 +---
 libcloud/test/compute/test_hostvirtual.py       |  3 +-
 libcloud/test/compute/test_joyent.py            |  2 +-
 libcloud/test/compute/test_ktucloud.py          |  3 +-
 libcloud/test/compute/test_linode.py            |  2 +-
 libcloud/test/compute/test_nephoscale.py        |  3 +-
 libcloud/test/compute/test_onapp.py             |  3 +-
 libcloud/test/compute/test_opennebula.py        | 18 ++++--------
 libcloud/test/compute/test_openstack.py         | 30 +++++++-------------
 libcloud/test/compute/test_packet.py            |  2 +-
 libcloud/test/compute/test_profitbricks.py      |  2 +-
 libcloud/test/compute/test_rackspace.py         |  7 ++---
 libcloud/test/compute/test_rimuhosting.py       |  3 +-
 libcloud/test/compute/test_runabove.py          |  3 +-
 libcloud/test/compute/test_softlayer.py         |  3 +-
 libcloud/test/compute/test_vcl.py               |  3 +-
 libcloud/test/compute/test_vcloud.py            | 11 +++----
 libcloud/test/compute/test_voxel.py             |  2 +-
 libcloud/test/compute/test_vpsnet.py            |  2 +-
 libcloud/test/compute/test_vultr.py             |  3 +-
 libcloud/test/container/test_docker.py          |  3 +-
 libcloud/test/container/test_docker_utils.py    |  3 +-
 libcloud/test/container/test_ecs.py             |  6 ++--
 libcloud/test/container/test_kubernetes.py      |  3 +-
 libcloud/test/dns/test_auroradns.py             |  3 +-
 libcloud/test/dns/test_cloudflare.py            |  3 +-
 libcloud/test/dns/test_digitalocean.py          |  3 +-
 libcloud/test/dns/test_dnsimple.py              |  3 +-
 libcloud/test/dns/test_durabledns.py            |  3 +-
 libcloud/test/dns/test_gandi.py                 |  3 +-
 libcloud/test/dns/test_godaddy.py               |  3 +-
 libcloud/test/dns/test_google.py                |  6 ++--
 libcloud/test/dns/test_hostvirtual.py           |  3 +-
 libcloud/test/dns/test_linode.py                |  3 +-
 libcloud/test/dns/test_liquidweb.py             |  3 +-
 libcloud/test/dns/test_nsone.py                 |  2 +-
 libcloud/test/dns/test_pointdns.py              |  3 +-
 libcloud/test/dns/test_rackspace.py             |  3 +-
 libcloud/test/dns/test_route53.py               |  3 +-
 libcloud/test/dns/test_softlayer.py             |  3 +-
 libcloud/test/dns/test_vultr.py                 |  3 +-
 libcloud/test/dns/test_worldwidedns.py          |  3 +-
 libcloud/test/dns/test_zerigo.py                |  3 +-
 libcloud/test/dns/test_zonomi.py                |  2 +-
 libcloud/test/loadbalancer/test_brightbox.py    |  3 +-
 libcloud/test/loadbalancer/test_cloudstack.py   |  3 +-
 .../test/loadbalancer/test_dimensiondata.py     |  2 +-
 libcloud/test/loadbalancer/test_elb.py          |  3 +-
 libcloud/test/loadbalancer/test_gce.py          |  7 ++---
 libcloud/test/loadbalancer/test_gogrid.py       |  3 +-
 libcloud/test/loadbalancer/test_rackspace.py    |  9 ++----
 libcloud/test/loadbalancer/test_slb.py          |  3 +-
 libcloud/test/loadbalancer/test_softlayer.py    |  3 +-
 libcloud/test/storage/test_atmos.py             |  2 +-
 libcloud/test/storage/test_azure_blobs.py       |  3 +-
 libcloud/test/storage/test_backblaze_b2.py      |  3 +-
 libcloud/test/storage/test_base.py              |  2 +-
 libcloud/test/storage/test_cloudfiles.py        |  3 +-
 libcloud/test/storage/test_oss.py               |  3 +-
 libcloud/test/storage/test_s3.py                |  3 +-
 87 files changed, 135 insertions(+), 218 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/common/base.py
----------------------------------------------------------------------
diff --git a/libcloud/common/base.py b/libcloud/common/base.py
index 22852b4..acf9a7f 100644
--- a/libcloud/common/base.py
+++ b/libcloud/common/base.py
@@ -600,6 +600,10 @@ class Connection(object):
                 url = '?'.join((action, urlencode(params, doseq=True)))
         else:
             url = action
+            
+        # IF connection has not yet been established
+        if self.connection is None:
+            self.connect()
 
         try:
             # @TODO: Should we just pass File object as body to request method

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/common/openstack_identity.py
----------------------------------------------------------------------
diff --git a/libcloud/common/openstack_identity.py b/libcloud/common/openstack_identity.py
index e8cc6a8..6a76e04 100644
--- a/libcloud/common/openstack_identity.py
+++ b/libcloud/common/openstack_identity.py
@@ -583,7 +583,7 @@ class OpenStackIdentityConnection(ConnectionUserAndKey):
 
         # enable tests to use the same mock connection classes.
         if parent_conn:
-            self.conn_classes = parent_conn.conn_classes
+            self.conn_class = parent_conn.conn_class
             self.driver = parent_conn.driver
         else:
             self.driver = None

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/backup/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/backup/test_dimensiondata.py b/libcloud/test/backup/test_dimensiondata.py
index 62fa4e9..285c777 100644
--- a/libcloud/test/backup/test_dimensiondata.py
+++ b/libcloud/test/backup/test_dimensiondata.py
@@ -36,7 +36,7 @@ from libcloud.test.secrets import DIMENSIONDATA_PARAMS
 class DimensionDataTests(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
-        DimensionData.connectionCls.conn_classes = (None, DimensionDataMockHttp)
+        DimensionData.connectionCls.conn_class = DimensionDataMockHttp
         DimensionDataMockHttp.type = None
         self.driver = DimensionData(*DIMENSIONDATA_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/common/test_cloudstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/common/test_cloudstack.py b/libcloud/test/common/test_cloudstack.py
index 2412d5c..0b59f01 100644
--- a/libcloud/test/common/test_cloudstack.py
+++ b/libcloud/test/common/test_cloudstack.py
@@ -47,7 +47,7 @@ class CloudStackMockDriver(object):
 
 class CloudStackCommonTest(unittest.TestCase):
     def setUp(self):
-        CloudStackConnection.conn_classes = (None, CloudStackMockHttp)
+        CloudStackConnection.conn_class = CloudStackMockHttp
         self.connection = CloudStackConnection('apikey', 'secret',
                                                host=CloudStackMockDriver.host)
         self.connection.poll_interval = 0.0

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/common/test_digitalocean_v1.py
----------------------------------------------------------------------
diff --git a/libcloud/test/common/test_digitalocean_v1.py b/libcloud/test/common/test_digitalocean_v1.py
index 9e99c7f..73481a7 100644
--- a/libcloud/test/common/test_digitalocean_v1.py
+++ b/libcloud/test/common/test_digitalocean_v1.py
@@ -26,8 +26,8 @@ from libcloud.utils.py3 import httplib
 class DigitalOceanTests(LibcloudTestCase):
 
     def setUp(self):
-        DigitalOceanBaseDriver.connectionCls.conn_classes = \
-            (None, DigitalOceanMockHttp)
+        DigitalOceanBaseDriver.connectionCls.conn_class = \
+            DigitalOceanMockHttp
         DigitalOceanMockHttp.type = None
         self.driver = DigitalOceanBaseDriver(*DIGITALOCEAN_v1_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/common/test_digitalocean_v2.py
----------------------------------------------------------------------
diff --git a/libcloud/test/common/test_digitalocean_v2.py b/libcloud/test/common/test_digitalocean_v2.py
index 37b4929..e1582ea 100644
--- a/libcloud/test/common/test_digitalocean_v2.py
+++ b/libcloud/test/common/test_digitalocean_v2.py
@@ -26,8 +26,8 @@ from libcloud.utils.py3 import httplib
 class DigitalOceanTests(LibcloudTestCase):
 
     def setUp(self):
-        DigitalOceanBaseDriver.connectionCls.conn_classes = \
-            (None, DigitalOceanMockHttp)
+        DigitalOceanBaseDriver.connectionCls.conn_class = \
+            DigitalOceanMockHttp
         DigitalOceanMockHttp.type = None
         self.driver = DigitalOceanBaseDriver(*DIGITALOCEAN_v2_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/common/test_google.py
----------------------------------------------------------------------
diff --git a/libcloud/test/common/test_google.py b/libcloud/test/common/test_google.py
index 2266ddd..0b79da6 100644
--- a/libcloud/test/common/test_google.py
+++ b/libcloud/test/common/test_google.py
@@ -154,8 +154,7 @@ class GoogleBaseAuthConnectionTest(GoogleTestCase):
     """
 
     def setUp(self):
-        GoogleBaseAuthConnection.conn_classes = (GoogleAuthMockHttp,
-                                                 GoogleAuthMockHttp)
+        GoogleBaseAuthConnection.conn_class = GoogleAuthMockHttp
         self.mock_scopes = ['foo', 'bar']
         kwargs = {'scopes': self.mock_scopes}
         self.conn = GoogleInstalledAppAuthConnection(*GCE_PARAMS,
@@ -191,8 +190,7 @@ class GoogleInstalledAppAuthConnectionTest(GoogleTestCase):
     """
 
     def setUp(self):
-        GoogleInstalledAppAuthConnection.conn_classes = (GoogleAuthMockHttp,
-                                                         GoogleAuthMockHttp)
+        GoogleInstalledAppAuthConnection.conn_class = GoogleAuthMockHttp
         self.mock_scopes = ['https://www.googleapis.com/auth/foo']
         kwargs = {'scopes': self.mock_scopes}
         self.conn = GoogleInstalledAppAuthConnection(*GCE_PARAMS,
@@ -314,8 +312,7 @@ class GoogleBaseConnectionTest(GoogleTestCase):
     """
 
     def setUp(self):
-        GoogleBaseAuthConnection.conn_classes = (GoogleAuthMockHttp,
-                                                 GoogleAuthMockHttp)
+        GoogleBaseAuthConnection.conn_class = GoogleAuthMockHttp
         self.mock_scopes = ['https://www.googleapis.com/auth/foo']
         kwargs = {'scopes': self.mock_scopes,
                   'auth_type': GoogleAuthType.IA}

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/common/test_openstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/common/test_openstack.py b/libcloud/test/common/test_openstack.py
index 79ec583..adef17e 100644
--- a/libcloud/test/common/test_openstack.py
+++ b/libcloud/test/common/test_openstack.py
@@ -25,7 +25,7 @@ from libcloud.utils.py3 import PY25
 class OpenStackBaseConnectionTest(unittest.TestCase):
     def setUp(self):
         self.timeout = 10
-        OpenStackBaseConnection.conn_classes = (None, Mock())
+        OpenStackBaseConnection.conn_class = Mock()
         self.connection = OpenStackBaseConnection('foo', 'bar',
                                                   timeout=self.timeout,
                                                   ex_force_auth_url='https://127.0.0.1')
@@ -36,10 +36,10 @@ class OpenStackBaseConnectionTest(unittest.TestCase):
         self.connection.connect()
         self.assertEqual(self.connection.timeout, self.timeout)
         if PY25:
-            self.connection.conn_classes[1].assert_called_with(host='127.0.0.1',
+            self.connection.conn_class.assert_called_with(host='127.0.0.1',
                                                                port=443)
         else:
-            self.connection.conn_classes[1].assert_called_with(host='127.0.0.1',
+            self.connection.conn_class.assert_called_with(host='127.0.0.1',
                                                                port=443,
                                                                timeout=10)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/common/test_openstack_identity.py
----------------------------------------------------------------------
diff --git a/libcloud/test/common/test_openstack_identity.py b/libcloud/test/common/test_openstack_identity.py
index 7c57cf1..b94cf11 100644
--- a/libcloud/test/common/test_openstack_identity.py
+++ b/libcloud/test/common/test_openstack_identity.py
@@ -44,8 +44,7 @@ from libcloud.test.compute.test_openstack import OpenStack_2_0_MockHttp
 class OpenStackIdentityConnectionTestCase(unittest.TestCase):
     def setUp(self):
         OpenStackBaseConnection.auth_url = None
-        OpenStackBaseConnection.conn_classes = (OpenStackMockHttp,
-                                                OpenStackMockHttp)
+        OpenStackBaseConnection.conn_class = OpenStackMockHttp
 
     def test_auth_url_is_correctly_assembled(self):
         tuples = [
@@ -207,8 +206,7 @@ class OpenStackIdentityConnectionTestCase(unittest.TestCase):
         self.assertEqual(mocked_auth_method.call_count, 1)
 
     def _get_mock_connection(self, mock_http_class, auth_url=None):
-        OpenStackBaseConnection.conn_classes = (mock_http_class,
-                                                mock_http_class)
+        OpenStackBaseConnection.conn_class = mock_http_class
 
         if auth_url is None:
             auth_url = "https://auth.api.example.com"
@@ -226,7 +224,7 @@ class OpenStackIdentity_2_0_ConnectionTests(unittest.TestCase):
     def setUp(self):
         mock_cls = OpenStackIdentity_2_0_MockHttp
         mock_cls.type = None
-        OpenStackIdentity_2_0_Connection.conn_classes = (mock_cls, mock_cls)
+        OpenStackIdentity_2_0_Connection.conn_class = mock_cls
 
         self.auth_instance = OpenStackIdentity_2_0_Connection(auth_url='http://none',
                                                               user_id='test',
@@ -247,7 +245,7 @@ class OpenStackIdentity_3_0_ConnectionTests(unittest.TestCase):
     def setUp(self):
         mock_cls = OpenStackIdentity_3_0_MockHttp
         mock_cls.type = None
-        OpenStackIdentity_3_0_Connection.conn_classes = (mock_cls, mock_cls)
+        OpenStackIdentity_3_0_Connection.conn_class = mock_cls
 
         self.auth_instance = OpenStackIdentity_3_0_Connection(auth_url='http://none',
                                                               user_id='test',

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_abiquo.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_abiquo.py b/libcloud/test/compute/test_abiquo.py
index 55c82d4..4bae089 100644
--- a/libcloud/test/compute/test_abiquo.py
+++ b/libcloud/test/compute/test_abiquo.py
@@ -44,7 +44,7 @@ class AbiquoNodeDriverTest(unittest.TestCase, TestCaseMixin):
         """
         Set up the driver with the main user
         """
-        AbiquoNodeDriver.connectionCls.conn_classes = (AbiquoMockHttp, None)
+        AbiquoNodeDriver.connectionCls.conn_class = AbiquoMockHttp
         self.driver = AbiquoNodeDriver('son', 'goku',
                                        'http://dummy.host.com/api')
 
@@ -65,7 +65,7 @@ class AbiquoNodeDriverTest(unittest.TestCase, TestCaseMixin):
         Test, through the 'list_images' method, that a '403 Forbidden'
         raises an 'ForbidenError' instead of the 'MalformedUrlException'
         """
-        AbiquoNodeDriver.connectionCls.conn_classes = (AbiquoMockHttp, None)
+        AbiquoNodeDriver.connectionCls.conn_class = AbiquoMockHttp
         conn = AbiquoNodeDriver('son', 'gohan', 'http://dummy.host.com/api')
         self.assertRaises(ForbiddenError, conn.list_images)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_azure.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_azure.py b/libcloud/test/compute/test_azure.py
index 46360aa..800cd7a 100644
--- a/libcloud/test/compute/test_azure.py
+++ b/libcloud/test/compute/test_azure.py
@@ -40,7 +40,7 @@ class AzureNodeDriverTests(LibcloudTestCase):
 
     def setUp(self):
         Azure = get_driver(Provider.AZURE)
-        Azure.connectionCls.conn_classes = (None, AzureMockHttp)
+        Azure.connectionCls.conn_class = AzureMockHttp
         self.driver = Azure(self.SUBSCRIPTION_ID, self.KEY_FILE)
 
     def test_locations_returned_successfully(self):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_bluebox.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_bluebox.py b/libcloud/test/compute/test_bluebox.py
index bcee0a3..1967d11 100644
--- a/libcloud/test/compute/test_bluebox.py
+++ b/libcloud/test/compute/test_bluebox.py
@@ -29,7 +29,7 @@ from libcloud.test.secrets import BLUEBOX_PARAMS
 class BlueboxTest(unittest.TestCase):
 
     def setUp(self):
-        Bluebox.connectionCls.conn_classes = (None, BlueboxMockHttp)
+        Bluebox.connectionCls.conn_class = BlueboxMockHttp
         self.driver = Bluebox(*BLUEBOX_PARAMS)
 
     def test_create_node(self):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_brightbox.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_brightbox.py b/libcloud/test/compute/test_brightbox.py
index 651c349..2ac57b0 100644
--- a/libcloud/test/compute/test_brightbox.py
+++ b/libcloud/test/compute/test_brightbox.py
@@ -39,8 +39,7 @@ USER_DATA = '#!/bin/sh\ntest_script.sh\n'
 class BrightboxTest(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
-        BrightboxNodeDriver.connectionCls.conn_classes = (
-            None, BrightboxMockHttp)
+        BrightboxNodeDriver.connectionCls.conn_class = BrightboxMockHttp
         BrightboxMockHttp.type = None
         self.driver = BrightboxNodeDriver(*BRIGHTBOX_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_cloudsigma_v1_0.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_cloudsigma_v1_0.py b/libcloud/test/compute/test_cloudsigma_v1_0.py
index d8fb310..197d63e 100644
--- a/libcloud/test/compute/test_cloudsigma_v1_0.py
+++ b/libcloud/test/compute/test_cloudsigma_v1_0.py
@@ -36,8 +36,7 @@ class CloudSigmaAPI10BaseTestCase(object):
         self.driver = self.driver_klass(*self.driver_args,
                                         **self.driver_kwargs)
 
-        self.driver.connectionCls.conn_classes = (None,
-                                                  CloudSigmaHttp)
+        self.driver.connectionCls.conn_class = CloudSigmaHttp
 
     def test_list_nodes(self):
         nodes = self.driver.list_nodes()

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_cloudsigma_v2_0.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_cloudsigma_v2_0.py b/libcloud/test/compute/test_cloudsigma_v2_0.py
index 4bc66a5..44bc1ce 100644
--- a/libcloud/test/compute/test_cloudsigma_v2_0.py
+++ b/libcloud/test/compute/test_cloudsigma_v2_0.py
@@ -35,8 +35,7 @@ from libcloud.test.file_fixtures import ComputeFileFixtures
 
 class CloudSigmaAPI20BaseTestCase(object):
     def setUp(self):
-        self.driver_klass.connectionCls.conn_classes = \
-            (CloudSigmaMockHttp, CloudSigmaMockHttp)
+        self.driver_klass.connectionCls.conn_class = CloudSigmaMockHttp
 
         CloudSigmaMockHttp.type = None
         CloudSigmaMockHttp.use_param = 'do'

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_cloudstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_cloudstack.py b/libcloud/test/compute/test_cloudstack.py
index 9f6b939..ad7072e 100644
--- a/libcloud/test/compute/test_cloudstack.py
+++ b/libcloud/test/compute/test_cloudstack.py
@@ -43,8 +43,7 @@ class CloudStackCommonTestCase(TestCaseMixin):
     driver_klass = CloudStackNodeDriver
 
     def setUp(self):
-        self.driver_klass.connectionCls.conn_classes = \
-            (None, CloudStackMockHttp)
+        self.driver_klass.connectionCls.conn_class = CloudStackMockHttp
         self.driver = self.driver_klass('apikey', 'secret',
                                         path='/test/path',
                                         host='api.dummy.com')

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_deployment.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_deployment.py b/libcloud/test/compute/test_deployment.py
index 7fda79c..b2bdab2 100644
--- a/libcloud/test/compute/test_deployment.py
+++ b/libcloud/test/compute/test_deployment.py
@@ -66,7 +66,7 @@ class MockClient(BaseSSHClient):
 class DeploymentTests(unittest.TestCase):
 
     def setUp(self):
-        Rackspace.connectionCls.conn_classes = (None, RackspaceMockHttp)
+        Rackspace.connectionCls.conn_class = RackspaceMockHttp
         RackspaceMockHttp.type = None
         self.driver = Rackspace(*RACKSPACE_PARAMS)
         # normally authentication happens lazily, but we force it here

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_digitalocean_v1.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_digitalocean_v1.py b/libcloud/test/compute/test_digitalocean_v1.py
index a09b1a8..7a409c9 100644
--- a/libcloud/test/compute/test_digitalocean_v1.py
+++ b/libcloud/test/compute/test_digitalocean_v1.py
@@ -36,8 +36,8 @@ from libcloud.test.secrets import DIGITALOCEAN_v2_PARAMS
 class DigitalOcean_v1_Tests(LibcloudTestCase):
 
     def setUp(self):
-        DigitalOceanNodeDriver.connectionCls.conn_classes = \
-            (None, DigitalOceanMockHttp)
+        DigitalOceanNodeDriver.connectionCls.conn_class = \
+            DigitalOceanMockHttp
         DigitalOceanMockHttp.type = None
         self.driver = DigitalOceanNodeDriver(*DIGITALOCEAN_v1_PARAMS,
                                              api_version='v1')

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_digitalocean_v2.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_digitalocean_v2.py b/libcloud/test/compute/test_digitalocean_v2.py
index 1754ce1..6a474af 100644
--- a/libcloud/test/compute/test_digitalocean_v2.py
+++ b/libcloud/test/compute/test_digitalocean_v2.py
@@ -39,8 +39,8 @@ from libcloud.test.secrets import DIGITALOCEAN_v2_PARAMS
 class DigitalOcean_v2_Tests(LibcloudTestCase):
 
     def setUp(self):
-        DigitalOceanNodeDriver.connectionCls.conn_classes = \
-            (None, DigitalOceanMockHttp)
+        DigitalOceanNodeDriver.connectionCls.conn_class = \
+            DigitalOceanMockHttp
         DigitalOceanMockHttp.type = None
         self.driver = DigitalOceanNodeDriver(*DIGITALOCEAN_v2_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_dimensiondata.py b/libcloud/test/compute/test_dimensiondata.py
index 8ec9d27..21b3d74 100644
--- a/libcloud/test/compute/test_dimensiondata.py
+++ b/libcloud/test/compute/test_dimensiondata.py
@@ -37,7 +37,7 @@ from libcloud.utils.xml import fixxpath, findtext
 class DimensionDataTests(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
-        DimensionData.connectionCls.conn_classes = (None, DimensionDataMockHttp)
+        DimensionData.connectionCls.conn_class = DimensionDataMockHttp
         DimensionDataMockHttp.type = None
         self.driver = DimensionData(*DIMENSIONDATA_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_ec2.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_ec2.py b/libcloud/test/compute/test_ec2.py
index 2356230..972c951 100644
--- a/libcloud/test/compute/test_ec2.py
+++ b/libcloud/test/compute/test_ec2.py
@@ -85,7 +85,7 @@ class EC2Tests(LibcloudTestCase, TestCaseMixin):
 
     def setUp(self):
         EC2MockHttp.test = self
-        EC2NodeDriver.connectionCls.conn_classes = (None, EC2MockHttp)
+        EC2NodeDriver.connectionCls.conn_class = EC2MockHttp
         EC2MockHttp.use_param = 'Action'
         EC2MockHttp.type = None
 
@@ -1195,7 +1195,7 @@ class EC2OldStyleModelTests(EC2Tests):
 
     def setUp(self):
         EC2MockHttp.test = self
-        EC2NodeDriver.connectionCls.conn_classes = (None, EC2MockHttp)
+        EC2NodeDriver.connectionCls.conn_class = EC2MockHttp
         EC2MockHttp.use_param = 'Action'
         EC2MockHttp.type = None
 
@@ -1643,7 +1643,7 @@ class EucMockHttp(EC2MockHttp):
 class NimbusTests(EC2Tests):
 
     def setUp(self):
-        NimbusNodeDriver.connectionCls.conn_classes = (None, EC2MockHttp)
+        NimbusNodeDriver.connectionCls.conn_class = EC2MockHttp
         EC2MockHttp.use_param = 'Action'
         EC2MockHttp.type = None
         self.driver = NimbusNodeDriver(key=EC2_PARAMS[0], secret=EC2_PARAMS[1],
@@ -1701,7 +1701,7 @@ class NimbusTests(EC2Tests):
 class EucTests(LibcloudTestCase, TestCaseMixin):
 
     def setUp(self):
-        EucNodeDriver.connectionCls.conn_classes = (None, EucMockHttp)
+        EucNodeDriver.connectionCls.conn_class = EucMockHttp
         EC2MockHttp.use_param = 'Action'
         EC2MockHttp.type = None
         self.driver = EucNodeDriver(key=EC2_PARAMS[0], secret=EC2_PARAMS[1],
@@ -1730,7 +1730,7 @@ class EucTests(LibcloudTestCase, TestCaseMixin):
 class OutscaleTests(EC2Tests):
 
     def setUp(self):
-        OutscaleSASNodeDriver.connectionCls.conn_classes = (None, EC2MockHttp)
+        OutscaleSASNodeDriver.connectionCls.conn_class = EC2MockHttp
         EC2MockHttp.use_param = 'Action'
         EC2MockHttp.type = None
         self.driver = OutscaleSASNodeDriver(key=EC2_PARAMS[0],

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_ecp.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_ecp.py b/libcloud/test/compute/test_ecp.py
index c39875c..93fdc71 100644
--- a/libcloud/test/compute/test_ecp.py
+++ b/libcloud/test/compute/test_ecp.py
@@ -29,8 +29,7 @@ from libcloud.test.secrets import ECP_PARAMS
 class ECPTests(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
-        ECPNodeDriver.connectionCls.conn_classes = (None,
-                                                    ECPMockHttp)
+        ECPNodeDriver.connectionCls.conn_class = ECPMockHttp
         self.driver = ECPNodeDriver(*ECP_PARAMS)
 
     def test_list_nodes(self):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_ecs.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_ecs.py b/libcloud/test/compute/test_ecs.py
index 495f7b2..f3012e0 100644
--- a/libcloud/test/compute/test_ecs.py
+++ b/libcloud/test/compute/test_ecs.py
@@ -36,7 +36,7 @@ class ECSDriverTestCase(LibcloudTestCase):
 
     def setUp(self):
         ECSMockHttp.test = self
-        ECSDriver.connectionCls.conn_classes = (ECSMockHttp, ECSMockHttp)
+        ECSDriver.connectionCls.conn_class = ECSMockHttp
         ECSMockHttp.use_param = 'Action'
         ECSMockHttp.type = None
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_elasticstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_elasticstack.py b/libcloud/test/compute/test_elasticstack.py
index 4cbbbe5..e6fb21c 100644
--- a/libcloud/test/compute/test_elasticstack.py
+++ b/libcloud/test/compute/test_elasticstack.py
@@ -149,8 +149,7 @@ class ElasticStackTestCase(object):
 class ElasticHostsTestCase(ElasticStackTestCase, unittest.TestCase):
 
     def setUp(self):
-        ElasticHosts.connectionCls.conn_classes = (None,
-                                                   ElasticStackMockHttp)
+        ElasticHosts.connectionCls.conn_class = ElasticStackMockHttp
 
         self.driver = ElasticHosts('foo', 'bar')
         images = self.driver.list_images()
@@ -181,8 +180,7 @@ class ElasticHostsTestCase(ElasticStackTestCase, unittest.TestCase):
 class SkaliCloudTestCase(ElasticStackTestCase, unittest.TestCase):
 
     def setUp(self):
-        SkaliCloud.connectionCls.conn_classes = (None,
-                                                 ElasticStackMockHttp)
+        SkaliCloud.connectionCls.conn_class = ElasticStackMockHttp
 
         self.driver = SkaliCloud('foo', 'bar')
 
@@ -195,8 +193,7 @@ class SkaliCloudTestCase(ElasticStackTestCase, unittest.TestCase):
 class ServerLoveTestCase(ElasticStackTestCase, unittest.TestCase):
 
     def setUp(self):
-        ServerLove.connectionCls.conn_classes = (None,
-                                                 ElasticStackMockHttp)
+        ServerLove.connectionCls.conn_class = ElasticStackMockHttp
 
         self.driver = ServerLove('foo', 'bar')
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_gandi.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_gandi.py b/libcloud/test/compute/test_gandi.py
index 0c00c15..abbedd5 100644
--- a/libcloud/test/compute/test_gandi.py
+++ b/libcloud/test/compute/test_gandi.py
@@ -34,8 +34,7 @@ class GandiTests(unittest.TestCase):
     node_name = 'test2'
 
     def setUp(self):
-        GandiNodeDriver.connectionCls.conn_classes = (
-            GandiMockHttp, GandiMockHttp)
+        GandiNodeDriver.connectionCls.conn_class = GandiMockHttp
         GandiMockHttp.type = None
         self.driver = GandiNodeDriver(*GANDI_PARAMS)
 
@@ -187,8 +186,7 @@ class GandiRatingTests(unittest.TestCase):
     node_name = 'test2'
 
     def setUp(self):
-        GandiNodeDriver.connectionCls.conn_classes = (
-            GandiMockRatingHttp, GandiMockRatingHttp)
+        GandiNodeDriver.connectionCls.conn_class = GandiMockRatingHttp
         GandiMockRatingHttp.type = None
         self.driver = GandiNodeDriver(*GANDI_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_gce.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_gce.py b/libcloud/test/compute/test_gce.py
index 162a756..2e386aa 100644
--- a/libcloud/test/compute/test_gce.py
+++ b/libcloud/test/compute/test_gce.py
@@ -53,9 +53,8 @@ class GCENodeDriverTest(GoogleTestCase, TestCaseMixin):
 
     def setUp(self):
         GCEMockHttp.test = self
-        GCENodeDriver.connectionCls.conn_classes = (GCEMockHttp, GCEMockHttp)
-        GoogleBaseAuthConnection.conn_classes = (GoogleAuthMockHttp,
-                                                 GoogleAuthMockHttp)
+        GCENodeDriver.connectionCls.conn_class = GCEMockHttp
+        GoogleBaseAuthConnection.conn_class = GoogleAuthMockHttp
         GCEMockHttp.type = None
         kwargs = GCE_KEYWORD_PARAMS.copy()
         kwargs['auth_type'] = 'IA'

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_gogrid.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_gogrid.py b/libcloud/test/compute/test_gogrid.py
index f7ceae6..08319d1 100644
--- a/libcloud/test/compute/test_gogrid.py
+++ b/libcloud/test/compute/test_gogrid.py
@@ -33,7 +33,7 @@ from libcloud.test.file_fixtures import ComputeFileFixtures  # pylint: disable-m
 class GoGridTests(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
-        GoGridNodeDriver.connectionCls.conn_classes = (None, GoGridMockHttp)
+        GoGridNodeDriver.connectionCls.conn_class = GoGridMockHttp
         GoGridMockHttp.type = None
         self.driver = GoGridNodeDriver("foo", "bar")
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_gridspot.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_gridspot.py b/libcloud/test/compute/test_gridspot.py
index 4e4de1b..a2e31f5 100644
--- a/libcloud/test/compute/test_gridspot.py
+++ b/libcloud/test/compute/test_gridspot.py
@@ -34,10 +34,7 @@ from libcloud.test.secrets import GRIDSPOT_PARAMS
 class GridspotTest(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
-        GridspotNodeDriver.connectionCls.conn_classes = (
-            None,
-            GridspotMockHttp
-        )
+        GridspotNodeDriver.conectionCls.conn_class = GridspotMockHttp
         GridspotMockHttp.type = None
         self.driver = GridspotNodeDriver(*GRIDSPOT_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_hostvirtual.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_hostvirtual.py b/libcloud/test/compute/test_hostvirtual.py
index 42cedc9..35d0fe1 100644
--- a/libcloud/test/compute/test_hostvirtual.py
+++ b/libcloud/test/compute/test_hostvirtual.py
@@ -28,8 +28,7 @@ from libcloud.test.secrets import HOSTVIRTUAL_PARAMS
 class HostVirtualTest(unittest.TestCase):
 
     def setUp(self):
-        HostVirtualNodeDriver.connectionCls.conn_classes = (
-            None, HostVirtualMockHttp)
+        HostVirtualNodeDriver.connectionCls.conn_class = HostVirtualMockHttp
         self.driver = HostVirtualNodeDriver(*HOSTVIRTUAL_PARAMS)
 
     def test_list_nodes(self):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_joyent.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_joyent.py b/libcloud/test/compute/test_joyent.py
index 90718fc..927fe37 100644
--- a/libcloud/test/compute/test_joyent.py
+++ b/libcloud/test/compute/test_joyent.py
@@ -28,7 +28,7 @@ from libcloud.test.secrets import JOYENT_PARAMS
 class JoyentTestCase(unittest.TestCase):
 
     def setUp(self):
-        JoyentNodeDriver.connectionCls.conn_classes = (None, JoyentHttp)
+        JoyentNodeDriver.connectionCls.conn_class = JoyentHttp
         self.driver = JoyentNodeDriver(*JOYENT_PARAMS)
 
     def test_instantiate_multiple_drivers_with_different_region(self):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_ktucloud.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_ktucloud.py b/libcloud/test/compute/test_ktucloud.py
index 2a27de1..9bb255e 100644
--- a/libcloud/test/compute/test_ktucloud.py
+++ b/libcloud/test/compute/test_ktucloud.py
@@ -35,8 +35,7 @@ from libcloud.test.file_fixtures import ComputeFileFixtures
 class KTUCloudNodeDriverTest(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
-        KTUCloudNodeDriver.connectionCls.conn_classes = \
-            (None, KTUCloudStackMockHttp)
+        KTUCloudNodeDriver.connectionCls.conn_class = KTUCloudStackMockHttp
         self.driver = KTUCloudNodeDriver('apikey', 'secret',
                                          path='/test/path',
                                          host='api.dummy.com')

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_linode.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_linode.py b/libcloud/test/compute/test_linode.py
index 9a35f07..bc53148 100644
--- a/libcloud/test/compute/test_linode.py
+++ b/libcloud/test/compute/test_linode.py
@@ -34,7 +34,7 @@ class LinodeTest(unittest.TestCase, TestCaseMixin):
     # The Linode test suite
 
     def setUp(self):
-        LinodeNodeDriver.connectionCls.conn_classes = (None, LinodeMockHttp)
+        LinodeNodeDriver.connectionCls.conn_class = LinodeMockHttp
         LinodeMockHttp.use_param = 'api_action'
         self.driver = LinodeNodeDriver('foo')
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_nephoscale.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_nephoscale.py b/libcloud/test/compute/test_nephoscale.py
index 0a0af0a..e279fab 100644
--- a/libcloud/test/compute/test_nephoscale.py
+++ b/libcloud/test/compute/test_nephoscale.py
@@ -30,8 +30,7 @@ from libcloud.test.file_fixtures import ComputeFileFixtures
 class NephoScaleTest(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
-        NephoscaleNodeDriver.connectionCls.conn_classes = (
-            NephoscaleMockHttp, NephoscaleMockHttp)
+        NephoscaleNodeDriver.connectionCls.conn_class = NephoscaleMockHttp
         self.driver = NephoscaleNodeDriver('user', 'password')
 
     def test_list_sizes(self):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_onapp.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_onapp.py b/libcloud/test/compute/test_onapp.py
index 08760e5..fb95b09 100644
--- a/libcloud/test/compute/test_onapp.py
+++ b/libcloud/test/compute/test_onapp.py
@@ -13,8 +13,7 @@ class OnAppNodeTestCase(LibcloudTestCase):
     driver_klass = OnAppNodeDriver
 
     def setUp(self):
-        self.driver_klass.connectionCls.conn_classes = \
-            (None, OnAppMockHttp)
+        self.driver_klass.connectionCls.conn_class = OnAppMockHttp
 
         self.driver = OnAppNodeDriver(*ONAPP_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_opennebula.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_opennebula.py b/libcloud/test/compute/test_opennebula.py
index 8dcedfd..345a2cf 100644
--- a/libcloud/test/compute/test_opennebula.py
+++ b/libcloud/test/compute/test_opennebula.py
@@ -73,8 +73,7 @@ class OpenNebula_1_4_Tests(unittest.TestCase, OpenNebulaCaseMixin):
         """
         Setup test environment.
         """
-        OpenNebulaNodeDriver.connectionCls.conn_classes = (
-            OpenNebula_1_4_MockHttp, OpenNebula_1_4_MockHttp)
+        OpenNebulaNodeDriver.connectionCls.conn_class = OpenNebula_1_4_MockHttp
         self.driver = OpenNebulaNodeDriver(*OPENNEBULA_PARAMS + ('1.4',))
 
     def test_create_node(self):
@@ -270,8 +269,7 @@ class OpenNebula_2_0_Tests(unittest.TestCase, OpenNebulaCaseMixin):
         """
         Setup test environment.
         """
-        OpenNebulaNodeDriver.connectionCls.conn_classes = (
-            OpenNebula_2_0_MockHttp, OpenNebula_2_0_MockHttp)
+        OpenNebulaNodeDriver.connectionCls.conn_class = OpenNebula_2_0_MockHttp
         self.driver = OpenNebulaNodeDriver(*OPENNEBULA_PARAMS + ('2.0',))
 
     def test_create_node(self):
@@ -542,8 +540,7 @@ class OpenNebula_3_0_Tests(unittest.TestCase, OpenNebulaCaseMixin):
         """
         Setup test environment.
         """
-        OpenNebulaNodeDriver.connectionCls.conn_classes = (
-            OpenNebula_3_0_MockHttp, OpenNebula_3_0_MockHttp)
+        OpenNebulaNodeDriver.connectionCls.conn_class = OpenNebula_3_0_MockHttp
         self.driver = OpenNebulaNodeDriver(*OPENNEBULA_PARAMS + ('3.0',))
 
     def test_ex_list_networks(self):
@@ -586,8 +583,7 @@ class OpenNebula_3_2_Tests(unittest.TestCase, OpenNebulaCaseMixin):
         """
         Setup test environment.
         """
-        OpenNebulaNodeDriver.connectionCls.conn_classes = (
-            OpenNebula_3_2_MockHttp, OpenNebula_3_2_MockHttp)
+        OpenNebulaNodeDriver.connectionCls.conn_class = OpenNebula_3_2_MockHttp
         self.driver = OpenNebulaNodeDriver(*OPENNEBULA_PARAMS + ('3.2',))
 
     def test_reboot_node(self):
@@ -651,8 +647,7 @@ class OpenNebula_3_6_Tests(unittest.TestCase, OpenNebulaCaseMixin):
         """
         Setup test environment.
         """
-        OpenNebulaNodeDriver.connectionCls.conn_classes = (
-            OpenNebula_3_6_MockHttp, OpenNebula_3_6_MockHttp)
+        OpenNebulaNodeDriver.connectionCls.conn_class = OpenNebula_3_6_MockHttp
         self.driver = OpenNebulaNodeDriver(*OPENNEBULA_PARAMS + ('3.6',))
 
     def test_create_volume(self):
@@ -721,8 +716,7 @@ class OpenNebula_3_8_Tests(unittest.TestCase, OpenNebulaCaseMixin):
         """
         Setup test environment.
         """
-        OpenNebulaNodeDriver.connectionCls.conn_classes = (
-            OpenNebula_3_8_MockHttp, OpenNebula_3_8_MockHttp)
+        OpenNebulaNodeDriver.connectionCls.conn_class = OpenNebula_3_8_MockHttp
         self.driver = OpenNebulaNodeDriver(*OPENNEBULA_PARAMS + ('3.8',))
 
     def test_list_sizes(self):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_openstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_openstack.py b/libcloud/test/compute/test_openstack.py
index ee2469d..2474b49 100644
--- a/libcloud/test/compute/test_openstack.py
+++ b/libcloud/test/compute/test_openstack.py
@@ -107,8 +107,7 @@ class OpenStack_1_0_Tests(unittest.TestCase, TestCaseMixin):
             return "https://servers.api.rackspacecloud.com/v1.0/slug"
         self.driver_klass.connectionCls.get_endpoint = get_endpoint
 
-        self.driver_klass.connectionCls.conn_classes = (OpenStackMockHttp,
-                                                        OpenStackMockHttp)
+        self.driver_klass.connectionCls.conn_class = OpenStackMockHttp
         self.driver_klass.connectionCls.auth_url = "https://auth.api.example.com"
 
         OpenStackMockHttp.type = None
@@ -639,8 +638,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin):
         return self.driver_type(*self.driver_args, **self.driver_kwargs)
 
     def setUp(self):
-        self.driver_klass.connectionCls.conn_classes = (
-            OpenStack_2_0_MockHttp, OpenStack_2_0_MockHttp)
+        self.driver_klass.connectionCls.conn_class = OpenStack_2_0_MockHttp
         self.driver_klass.connectionCls.auth_url = "https://auth.api.example.com"
 
         OpenStackMockHttp.type = None
@@ -798,8 +796,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin):
 
     def test_list_nodes_no_image_id_attribute(self):
         # Regression test for LIBCLOD-455
-        self.driver_klass.connectionCls.conn_classes[0].type = 'ERROR_STATE_NO_IMAGE_ID'
-        self.driver_klass.connectionCls.conn_classes[1].type = 'ERROR_STATE_NO_IMAGE_ID'
+        self.driver_klass.connectionCls.conn_class.type = 'ERROR_STATE_NO_IMAGE_ID'
 
         nodes = self.driver.list_nodes()
         self.assertEqual(nodes[0].extra['imageId'], None)
@@ -1429,8 +1426,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin):
 
     def test_ex_list_snapshots(self):
         if self.driver_type.type == 'rackspace':
-            self.conn_classes[0].type = 'RACKSPACE'
-            self.conn_classes[1].type = 'RACKSPACE'
+            self.conn_class.type = 'RACKSPACE'
 
         snapshots = self.driver.ex_list_snapshots()
         self.assertEqual(len(snapshots), 3)
@@ -1447,8 +1443,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin):
 
         # rackspace needs a different mocked response for snapshots, but not for volumes
         if self.driver_type.type == 'rackspace':
-            self.conn_classes[0].type = 'RACKSPACE'
-            self.conn_classes[1].type = 'RACKSPACE'
+            self.conn_class.type = 'RACKSPACE'
 
         snapshots = self.driver.list_volume_snapshots(volume)
         self.assertEqual(len(snapshots), 1)
@@ -1457,8 +1452,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin):
     def test_create_volume_snapshot(self):
         volume = self.driver.list_volumes()[0]
         if self.driver_type.type == 'rackspace':
-            self.conn_classes[0].type = 'RACKSPACE'
-            self.conn_classes[1].type = 'RACKSPACE'
+            self.conn_class.type = 'RACKSPACE'
 
         ret = self.driver.create_volume_snapshot(volume,
                                                  'Test Volume',
@@ -1469,8 +1463,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin):
     def test_ex_create_snapshot(self):
         volume = self.driver.list_volumes()[0]
         if self.driver_type.type == 'rackspace':
-            self.conn_classes[0].type = 'RACKSPACE'
-            self.conn_classes[1].type = 'RACKSPACE'
+            self.conn_class.type = 'RACKSPACE'
 
         ret = self.driver.ex_create_snapshot(volume,
                                              'Test Volume',
@@ -1480,8 +1473,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin):
 
     def test_destroy_volume_snapshot(self):
         if self.driver_type.type == 'rackspace':
-            self.conn_classes[0].type = 'RACKSPACE'
-            self.conn_classes[1].type = 'RACKSPACE'
+            self.conn_class.type = 'RACKSPACE'
 
         snapshot = self.driver.ex_list_snapshots()[0]
         ret = self.driver.destroy_volume_snapshot(snapshot)
@@ -1489,8 +1481,7 @@ class OpenStack_1_1_Tests(unittest.TestCase, TestCaseMixin):
 
     def test_ex_delete_snapshot(self):
         if self.driver_type.type == 'rackspace':
-            self.conn_classes[0].type = 'RACKSPACE'
-            self.conn_classes[1].type = 'RACKSPACE'
+            self.conn_class.type = 'RACKSPACE'
 
         snapshot = self.driver.ex_list_snapshots()[0]
         ret = self.driver.ex_delete_snapshot(snapshot)
@@ -1905,8 +1896,7 @@ class OpenStack_1_1_Auth_2_0_Tests(OpenStack_1_1_Tests):
     driver_kwargs = {'ex_force_auth_version': '2.0'}
 
     def setUp(self):
-        self.driver_klass.connectionCls.conn_classes = \
-            (OpenStack_2_0_MockHttp, OpenStack_2_0_MockHttp)
+        self.driver_klass.connectionCls.conn_class = OpenStack_2_0_MockHttp
         self.driver_klass.connectionCls.auth_url = "https://auth.api.example.com"
         OpenStackMockHttp.type = None
         OpenStack_1_1_MockHttp.type = None

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_packet.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_packet.py b/libcloud/test/compute/test_packet.py
index 3a17b11..18799a5 100644
--- a/libcloud/test/compute/test_packet.py
+++ b/libcloud/test/compute/test_packet.py
@@ -33,7 +33,7 @@ from libcloud.test.file_fixtures import ComputeFileFixtures
 
 class PacketTest(unittest.TestCase, TestCaseMixin):
     def setUp(self):
-        PacketNodeDriver.connectionCls.conn_classes = (None, PacketMockHttp)
+        PacketNodeDriver.connectionCls.conn_class = PacketMockHttp
         self.driver = PacketNodeDriver('foo')
 
     def test_list_nodes(self):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_profitbricks.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_profitbricks.py b/libcloud/test/compute/test_profitbricks.py
index 0a5c068..3d28493 100644
--- a/libcloud/test/compute/test_profitbricks.py
+++ b/libcloud/test/compute/test_profitbricks.py
@@ -29,7 +29,7 @@ class ProfitBricksTests(unittest.TestCase):
 
     def setUp(self):
         ProfitBricks = get_driver(Provider.PROFIT_BRICKS)
-        ProfitBricks.connectionCls.conn_classes = (None, ProfitBricksMockHttp)
+        ProfitBricks.connectionCls.conn_class = ProfitBricksMockHttp
         self.driver = ProfitBricks(*PROFIT_BRICKS_PARAMS)
 
     ''' Server Function Tests

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_rackspace.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_rackspace.py b/libcloud/test/compute/test_rackspace.py
index e24b873..3c31316 100644
--- a/libcloud/test/compute/test_rackspace.py
+++ b/libcloud/test/compute/test_rackspace.py
@@ -119,17 +119,16 @@ class RackspaceNovaLonMockHttp(RackspaceNovaMockHttp):
 
 # Does not derive from TestCase because it should not be used by setup.py test
 class BaseRackspaceNovaTestCase(object):
-    conn_classes = (RackspaceNovaMockHttp, RackspaceNovaMockHttp)
+    conn_class = RackspaceNovaMockHttp
     auth_url = 'https://auth.api.example.com'
 
     def create_driver(self):
         return self.driver_type(*self.driver_args, **self.driver_kwargs)
 
     def setUp(self):
-        self.driver_klass.connectionCls.conn_classes = self.conn_classes
+        self.driver_klass.connectionCls.conn_class = self.conn_class
         self.driver_klass.connectionCls.auth_url = self.auth_url
-        self.conn_classes[0].type = None
-        self.conn_classes[1].type = None
+        self.conn_class.type = None
         self.driver = self.create_driver()
         # normally authentication happens lazily, but we force it here
         self.driver.connection._populate_hosts_and_request_paths()

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_rimuhosting.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_rimuhosting.py b/libcloud/test/compute/test_rimuhosting.py
index f8eb3ab..76b2c91 100644
--- a/libcloud/test/compute/test_rimuhosting.py
+++ b/libcloud/test/compute/test_rimuhosting.py
@@ -28,8 +28,7 @@ from libcloud.test.file_fixtures import ComputeFileFixtures
 class RimuHostingTest(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
-        RimuHostingNodeDriver.connectionCls.conn_classes = (None,
-                                                            RimuHostingMockHttp)
+        RimuHostingNodeDriver.connectionCls.conn_class = RimuHostingMockHttp
         self.driver = RimuHostingNodeDriver('foo')
 
     def test_list_nodes(self):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_runabove.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_runabove.py b/libcloud/test/compute/test_runabove.py
index a1538e0..bf20b87 100644
--- a/libcloud/test/compute/test_runabove.py
+++ b/libcloud/test/compute/test_runabove.py
@@ -107,8 +107,7 @@ class RunAboveMockHttp(BaseRunAboveMockHttp):
 @patch('libcloud.common.runabove.RunAboveConnection._timedelta', 42)
 class RunAboveTests(unittest.TestCase):
     def setUp(self):
-        RunAboveNodeDriver.connectionCls.conn_classes = (
-            RunAboveMockHttp, RunAboveMockHttp)
+        RunAboveNodeDriver.connectionCls.conn_class = RunAboveMockHttp
         RunAboveMockHttp.type = None
         self.driver = RunAboveNodeDriver(*RUNABOVE_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_softlayer.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_softlayer.py b/libcloud/test/compute/test_softlayer.py
index d1e74fa..b3ebcb6 100644
--- a/libcloud/test/compute/test_softlayer.py
+++ b/libcloud/test/compute/test_softlayer.py
@@ -45,8 +45,7 @@ null_fingerprint = '00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:' + \
 class SoftLayerTests(unittest.TestCase):
 
     def setUp(self):
-        SoftLayer.connectionCls.conn_classes = (
-            SoftLayerMockHttp, SoftLayerMockHttp)
+        SoftLayer.connectionCls.conn_class = SoftLayerMockHttp
         SoftLayerMockHttp.type = None
         self.driver = SoftLayer(*SOFTLAYER_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_vcl.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_vcl.py b/libcloud/test/compute/test_vcl.py
index 31d0fb0..f8604d0 100644
--- a/libcloud/test/compute/test_vcl.py
+++ b/libcloud/test/compute/test_vcl.py
@@ -30,8 +30,7 @@ from libcloud.test.secrets import VCL_PARAMS
 class VCLTests(unittest.TestCase):
 
     def setUp(self):
-        VCL.connectionCls.conn_classes = (
-            VCLMockHttp, VCLMockHttp)
+        VCL.connectionCls.conn_class = VCLMockHttp
         VCLMockHttp.type = None
         self.driver = VCL(*VCL_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_vcloud.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_vcloud.py b/libcloud/test/compute/test_vcloud.py
index 74acaeb..4a743f4 100644
--- a/libcloud/test/compute/test_vcloud.py
+++ b/libcloud/test/compute/test_vcloud.py
@@ -42,7 +42,7 @@ class TerremarkTests(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
         VCloudNodeDriver.connectionCls.host = "test"
-        VCloudNodeDriver.connectionCls.conn_classes = (None, TerremarkMockHttp)
+        VCloudNodeDriver.connectionCls.conn_class = TerremarkMockHttp
         TerremarkMockHttp.type = None
         self.driver = TerremarkDriver(*VCLOUD_PARAMS)
 
@@ -96,8 +96,7 @@ class VCloud_1_5_Tests(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
         VCloudNodeDriver.connectionCls.host = 'test'
-        VCloudNodeDriver.connectionCls.conn_classes = (
-            None, VCloud_1_5_MockHttp)
+        VCloudNodeDriver.connectionCls.conn_class = VCloud_1_5_MockHttp
         VCloud_1_5_MockHttp.type = None
         self.driver = VCloud_1_5_NodeDriver(*VCLOUD_PARAMS)
 
@@ -339,8 +338,7 @@ class VCloud_5_1_Tests(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
         VCloudNodeDriver.connectionCls.host = 'test'
-        VCloudNodeDriver.connectionCls.conn_classes = (
-            None, VCloud_1_5_MockHttp)
+        VCloudNodeDriver.connectionCls.conn_class = VCloud_1_5_MockHttp
         VCloud_1_5_MockHttp.type = None
         self.driver = VCloudNodeDriver(
             *VCLOUD_PARAMS, **{'api_version': '5.1'})
@@ -397,8 +395,7 @@ class VCloud_5_5_Tests(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
         VCloudNodeDriver.connectionCls.host = 'test'
-        VCloudNodeDriver.connectionCls.conn_classes = (
-            None, VCloud_5_5_MockHttp)
+        VCloudNodeDriver.connectionCls.conn_class = VCloud_5_5_MockHttp
         VCloud_5_5_MockHttp.type = None
         self.driver = VCloudNodeDriver(
             *VCLOUD_PARAMS, **{'api_version': '5.5'})

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_voxel.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_voxel.py b/libcloud/test/compute/test_voxel.py
index e8ea8b0..a9486c9 100644
--- a/libcloud/test/compute/test_voxel.py
+++ b/libcloud/test/compute/test_voxel.py
@@ -30,7 +30,7 @@ class VoxelTest(unittest.TestCase):
 
     def setUp(self):
 
-        Voxel.connectionCls.conn_classes = (None, VoxelMockHttp)
+        Voxel.connectionCls.conn_class = VoxelMockHttp
         VoxelMockHttp.type = None
         self.driver = Voxel(*VOXEL_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_vpsnet.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_vpsnet.py b/libcloud/test/compute/test_vpsnet.py
index 9053a46..d01b1b0 100644
--- a/libcloud/test/compute/test_vpsnet.py
+++ b/libcloud/test/compute/test_vpsnet.py
@@ -30,7 +30,7 @@ from libcloud.test.file_fixtures import ComputeFileFixtures
 class VPSNetTests(unittest.TestCase, TestCaseMixin):
 
     def setUp(self):
-        VPSNetNodeDriver.connectionCls.conn_classes = (None, VPSNetMockHttp)
+        VPSNetNodeDriver.connectionCls.conn_class = VPSNetMockHttp
         self.driver = VPSNetNodeDriver(*VPSNET_PARAMS)
 
     def test_create_node(self):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/compute/test_vultr.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_vultr.py b/libcloud/test/compute/test_vultr.py
index 066cc86..6a34194 100644
--- a/libcloud/test/compute/test_vultr.py
+++ b/libcloud/test/compute/test_vultr.py
@@ -33,8 +33,7 @@ from libcloud.test.secrets import VULTR_PARAMS
 class VultrTests(LibcloudTestCase):
 
     def setUp(self):
-        VultrNodeDriver.connectionCls.conn_classes = \
-            (VultrMockHttp, VultrMockHttp)
+        VultrNodeDriver.connectionCls.conn_class = VultrMockHttp
         VultrMockHttp.type = None
         self.driver = VultrNodeDriver(*VULTR_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/container/test_docker.py
----------------------------------------------------------------------
diff --git a/libcloud/test/container/test_docker.py b/libcloud/test/container/test_docker.py
index a1978f7..ba2f29a 100644
--- a/libcloud/test/container/test_docker.py
+++ b/libcloud/test/container/test_docker.py
@@ -30,8 +30,7 @@ from libcloud.test import MockHttp
 class DockerContainerDriverTestCase(unittest.TestCase):
 
     def setUp(self):
-        DockerContainerDriver.connectionCls.conn_classes = (
-            DockerMockHttp, DockerMockHttp)
+        DockerContainerDriver.connectionCls.conn_class = DockerMockHttp
         DockerMockHttp.type = None
         DockerMockHttp.use_param = 'a'
         self.driver = DockerContainerDriver(*CONTAINER_PARAMS_DOCKER)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/container/test_docker_utils.py
----------------------------------------------------------------------
diff --git a/libcloud/test/container/test_docker_utils.py b/libcloud/test/container/test_docker_utils.py
index 8c8bd90..adf66a8 100644
--- a/libcloud/test/container/test_docker_utils.py
+++ b/libcloud/test/container/test_docker_utils.py
@@ -25,8 +25,7 @@ from libcloud.test import MockHttp
 class DockerUtilitiesTestCase(unittest.TestCase):
 
     def setUp(self):
-        HubClient.connectionCls.conn_classes = (
-            DockerMockHttp, DockerMockHttp)
+        HubClient.connectionCls.conn_class = DockerMockHttp
         DockerMockHttp.type = None
         DockerMockHttp.use_param = 'a'
         self.driver = HubClient()

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/container/test_ecs.py
----------------------------------------------------------------------
diff --git a/libcloud/test/container/test_ecs.py b/libcloud/test/container/test_ecs.py
index 73a35b3..59956d8 100644
--- a/libcloud/test/container/test_ecs.py
+++ b/libcloud/test/container/test_ecs.py
@@ -30,12 +30,10 @@ from libcloud.test import MockHttp
 class ElasticContainerDriverTestCase(unittest.TestCase):
 
     def setUp(self):
-        ElasticContainerDriver.connectionCls.conn_classes = (
-            ECSMockHttp, ECSMockHttp)
+        ElasticContainerDriver.connectionCls.conn_class = ECSMockHttp
         ECSMockHttp.type = None
         ECSMockHttp.use_param = 'a'
-        ElasticContainerDriver.ecrConnectionClass.conn_classes = (
-            ECSMockHttp, ECSMockHttp)
+        ElasticContainerDriver.ecrConnectionClass.conn_class = ECSMockHttp
 
         self.driver = ElasticContainerDriver(*CONTAINER_PARAMS_ECS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/container/test_kubernetes.py
----------------------------------------------------------------------
diff --git a/libcloud/test/container/test_kubernetes.py b/libcloud/test/container/test_kubernetes.py
index b60a648..5ec57d9 100644
--- a/libcloud/test/container/test_kubernetes.py
+++ b/libcloud/test/container/test_kubernetes.py
@@ -30,8 +30,7 @@ from libcloud.test import MockHttp
 class KubernetesContainerDriverTestCase(unittest.TestCase):
 
     def setUp(self):
-        KubernetesContainerDriver.connectionCls.conn_classes = (
-            KubernetesMockHttp, KubernetesMockHttp)
+        KubernetesContainerDriver.connectionCls.conn_class = KubernetesMockHttp
         KubernetesMockHttp.type = None
         KubernetesMockHttp.use_param = 'a'
         self.driver = KubernetesContainerDriver(*CONTAINER_PARAMS_KUBERNETES)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_auroradns.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_auroradns.py b/libcloud/test/dns/test_auroradns.py
index 278f76d..e599c65 100644
--- a/libcloud/test/dns/test_auroradns.py
+++ b/libcloud/test/dns/test_auroradns.py
@@ -33,8 +33,7 @@ from libcloud.utils.py3 import httplib
 class AuroraDNSDriverTests(LibcloudTestCase):
 
     def setUp(self):
-        AuroraDNSDriver.connectionCls.conn_classes = (None,
-                                                      AuroraDNSDriverMockHttp)
+        AuroraDNSDriver.connectionCls.conn_class = AuroraDNSDriverMockHttp
         AuroraDNSDriverMockHttp.type = None
         self.driver = AuroraDNSDriver(*DNS_PARAMS_AURORADNS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_cloudflare.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_cloudflare.py b/libcloud/test/dns/test_cloudflare.py
index 8cf3fe0..53ff755 100644
--- a/libcloud/test/dns/test_cloudflare.py
+++ b/libcloud/test/dns/test_cloudflare.py
@@ -30,8 +30,7 @@ from libcloud.test import MockHttp
 class CloudFlareDNSDriverTestCase(unittest.TestCase):
 
     def setUp(self):
-        CloudFlareDNSDriver.connectionCls.conn_classes = (
-            CloudFlareMockHttp, CloudFlareMockHttp)
+        CloudFlareDNSDriver.connectionCls.conn_class = CloudFlareMockHttp
         CloudFlareMockHttp.type = None
         CloudFlareMockHttp.use_param = 'a'
         self.driver = CloudFlareDNSDriver(*DNS_PARAMS_CLOUDFLARE)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_digitalocean.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_digitalocean.py b/libcloud/test/dns/test_digitalocean.py
index f1bb92e..8046fda 100644
--- a/libcloud/test/dns/test_digitalocean.py
+++ b/libcloud/test/dns/test_digitalocean.py
@@ -26,8 +26,7 @@ from libcloud.utils.py3 import httplib
 class DigitalOceanDNSTests(LibcloudTestCase):
 
     def setUp(self):
-        DigitalOceanDNSDriver.connectionCls.conn_classes = \
-            (None, DigitalOceanDNSMockHttp)
+        DigitalOceanDNSDriver.connectionCls.conn_class = DigitalOceanDNSMockHttp
         DigitalOceanDNSMockHttp.type = None
         self.driver = DigitalOceanDNSDriver(*DIGITALOCEAN_v2_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_dnsimple.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_dnsimple.py b/libcloud/test/dns/test_dnsimple.py
index b73ce75..3e48207 100644
--- a/libcloud/test/dns/test_dnsimple.py
+++ b/libcloud/test/dns/test_dnsimple.py
@@ -26,8 +26,7 @@ from libcloud.test.secrets import DNS_PARAMS_DNSIMPLE
 
 class DNSimpleDNSTests(unittest.TestCase):
     def setUp(self):
-        DNSimpleDNSDriver.connectionCls.conn_classes = (
-            None, DNSimpleDNSMockHttp)
+        DNSimpleDNSDriver.connectionCls.conn_class = DNSimpleDNSMockHttp
         DNSimpleDNSMockHttp.type = None
         self.driver = DNSimpleDNSDriver(*DNS_PARAMS_DNSIMPLE)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_durabledns.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_durabledns.py b/libcloud/test/dns/test_durabledns.py
index 4d6cc88..5c0b041 100644
--- a/libcloud/test/dns/test_durabledns.py
+++ b/libcloud/test/dns/test_durabledns.py
@@ -34,8 +34,7 @@ from libcloud.dns.drivers.durabledns import RECORD_EXTRA_PARAMS_DEFAULT_VALUES
 class DurableDNSTests(LibcloudTestCase):
 
     def setUp(self):
-        DurableDNSDriver.connectionCls.conn_classes = \
-            (None, DurableDNSMockHttp)
+        DurableDNSDriver.connectionCls.conn_class = DurableDNSMockHttp
         DurableDNSMockHttp.type = None
         self.driver = DurableDNSDriver(*DNS_PARAMS_DURABLEDNS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_gandi.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_gandi.py b/libcloud/test/dns/test_gandi.py
index 4c3d6b6..c2c847a 100644
--- a/libcloud/test/dns/test_gandi.py
+++ b/libcloud/test/dns/test_gandi.py
@@ -28,8 +28,7 @@ from libcloud.test.common.test_gandi import BaseGandiMockHttp
 class GandiTests(unittest.TestCase):
 
     def setUp(self):
-        GandiDNSDriver.connectionCls.conn_classes = (
-            GandiMockHttp, GandiMockHttp)
+        GandiDNSDriver.connectionCls.conn_class = GandiMockHttp
         GandiMockHttp.type = None
         self.driver = GandiDNSDriver(*DNS_GANDI)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_godaddy.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_godaddy.py b/libcloud/test/dns/test_godaddy.py
index 76360b1..405c774 100644
--- a/libcloud/test/dns/test_godaddy.py
+++ b/libcloud/test/dns/test_godaddy.py
@@ -28,8 +28,7 @@ class GoDaddyTests(unittest.TestCase):
 
     def setUp(self):
         GoDaddyMockHttp.type = None
-        GoDaddyDNSDriver.connectionCls.conn_classes = (
-            None, GoDaddyMockHttp)
+        GoDaddyDNSDriver.connectionCls.conn_class = GoDaddyMockHttp
         self.driver = GoDaddyDNSDriver(*DNS_PARAMS_GODADDY)
 
     def assertHasKeys(self, dictionary, keys):

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_google.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_google.py b/libcloud/test/dns/test_google.py
index 5c8adca..ebc2c0f 100644
--- a/libcloud/test/dns/test_google.py
+++ b/libcloud/test/dns/test_google.py
@@ -32,10 +32,8 @@ class GoogleTests(GoogleTestCase):
 
     def setUp(self):
         GoogleDNSMockHttp.test = self
-        GoogleDNSDriver.connectionCls.conn_classes = (GoogleDNSMockHttp,
-                                                      GoogleDNSMockHttp)
-        GoogleBaseAuthConnection.conn_classes = (GoogleAuthMockHttp,
-                                                 GoogleAuthMockHttp)
+        GoogleDNSDriver.connectionCls.conn_class = GoogleDNSMockHttp
+        GoogleBaseAuthConnection.conn_class = GoogleAuthMockHttp
         GoogleDNSMockHttp.type = None
         kwargs = DNS_KEYWORD_PARAMS_GOOGLE.copy()
         kwargs['auth_type'] = 'IA'

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_hostvirtual.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_hostvirtual.py b/libcloud/test/dns/test_hostvirtual.py
index cb6ed8f..7fdfb2b 100644
--- a/libcloud/test/dns/test_hostvirtual.py
+++ b/libcloud/test/dns/test_hostvirtual.py
@@ -28,8 +28,7 @@ from libcloud.test.secrets import DNS_PARAMS_HOSTVIRTUAL
 
 class HostVirtualTests(unittest.TestCase):
     def setUp(self):
-        HostVirtualDNSDriver.connectionCls.conn_classes = (
-            None, HostVirtualMockHttp)
+        HostVirtualDNSDriver.connectionCls.conn_class = HostVirtualMockHttp
         HostVirtualMockHttp.type = None
         self.driver = HostVirtualDNSDriver(*DNS_PARAMS_HOSTVIRTUAL)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_linode.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_linode.py b/libcloud/test/dns/test_linode.py
index 7933a51..d197c1d 100644
--- a/libcloud/test/dns/test_linode.py
+++ b/libcloud/test/dns/test_linode.py
@@ -29,8 +29,7 @@ from libcloud.test.secrets import DNS_PARAMS_LINODE
 
 class LinodeTests(unittest.TestCase):
     def setUp(self):
-        LinodeDNSDriver.connectionCls.conn_classes = (
-            None, LinodeMockHttp)
+        LinodeDNSDriver.connectionCls.conn_class = LinodeMockHttp
         LinodeMockHttp.use_param = 'api_action'
         LinodeMockHttp.type = None
         self.driver = LinodeDNSDriver(*DNS_PARAMS_LINODE)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_liquidweb.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_liquidweb.py b/libcloud/test/dns/test_liquidweb.py
index f7f96fa..95e4b78 100644
--- a/libcloud/test/dns/test_liquidweb.py
+++ b/libcloud/test/dns/test_liquidweb.py
@@ -31,8 +31,7 @@ class LiquidWebTests(unittest.TestCase):
 
     def setUp(self):
         LiquidWebMockHttp.type = None
-        LiquidWebDNSDriver.connectionCls.conn_classes = (
-            None, LiquidWebMockHttp)
+        LiquidWebDNSDriver.connectionCls.conn_class = LiquidWebMockHttp
         self.driver = LiquidWebDNSDriver(*DNS_PARAMS_LIQUIDWEB)
         self.test_zone = Zone(id='11', type='master', ttl=None,
                               domain='example.com', extra={},

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_nsone.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_nsone.py b/libcloud/test/dns/test_nsone.py
index 9387542..91f8b00 100644
--- a/libcloud/test/dns/test_nsone.py
+++ b/libcloud/test/dns/test_nsone.py
@@ -14,7 +14,7 @@ from libcloud.dns.base import Zone, Record
 class NsOneTests(unittest.TestCase):
     def setUp(self):
         NsOneMockHttp.type = None
-        NsOneDNSDriver.connectionCls.conn_classes = (None, NsOneMockHttp)
+        NsOneDNSDriver.connectionCls.conn_class = NsOneMockHttp
         self.driver = NsOneDNSDriver(*DNS_PARAMS_NSONE)
         self.test_zone = Zone(id='test.com', type='master', ttl=None,
                               domain='test.com', extra={}, driver=self)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_pointdns.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_pointdns.py b/libcloud/test/dns/test_pointdns.py
index 0dfb417..3a8180d 100644
--- a/libcloud/test/dns/test_pointdns.py
+++ b/libcloud/test/dns/test_pointdns.py
@@ -30,8 +30,7 @@ from libcloud.test.secrets import DNS_PARAMS_POINTDNS
 
 class PointDNSTests(unittest.TestCase):
     def setUp(self):
-        PointDNSDriver.connectionCls.conn_classes = (
-            None, PointDNSMockHttp)
+        PointDNSDriver.connectionCls.conn_class = PointDNSMockHttp
         PointDNSMockHttp.type = None
         self.driver = PointDNSDriver(*DNS_PARAMS_POINTDNS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_rackspace.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_rackspace.py b/libcloud/test/dns/test_rackspace.py
index aa8ad10..6140987 100644
--- a/libcloud/test/dns/test_rackspace.py
+++ b/libcloud/test/dns/test_rackspace.py
@@ -51,8 +51,7 @@ class RackspaceUSTests(unittest.TestCase):
     endpoint_url = 'https://dns.api.rackspacecloud.com/v1.0/11111'
 
     def setUp(self):
-        self.klass.connectionCls.conn_classes = (
-            None, RackspaceMockHttp)
+        self.klass.connectionCls.conn_class = RackspaceMockHttp
         RackspaceMockHttp.type = None
         self.driver = self.klass(*DNS_PARAMS_RACKSPACE)
         self.driver.connection.poll_interval = 0.0

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_route53.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_route53.py b/libcloud/test/dns/test_route53.py
index 157d469..1692f22 100644
--- a/libcloud/test/dns/test_route53.py
+++ b/libcloud/test/dns/test_route53.py
@@ -28,8 +28,7 @@ from libcloud.test.secrets import DNS_PARAMS_ROUTE53
 
 class Route53Tests(unittest.TestCase):
     def setUp(self):
-        Route53DNSDriver.connectionCls.conn_classes = (
-            Route53MockHttp, Route53MockHttp)
+        Route53DNSDriver.connectionCls.conn_class = Route53MockHttp
         Route53MockHttp.type = None
         self.driver = Route53DNSDriver(*DNS_PARAMS_ROUTE53)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_softlayer.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_softlayer.py b/libcloud/test/dns/test_softlayer.py
index fcb6d4d..4a9e93f 100644
--- a/libcloud/test/dns/test_softlayer.py
+++ b/libcloud/test/dns/test_softlayer.py
@@ -30,8 +30,7 @@ from libcloud.utils.py3 import xmlrpclib
 class SoftLayerTests(unittest.TestCase):
 
     def setUp(self):
-        SoftLayerDNSDriver.connectionCls.conn_classes = (
-            SoftLayerDNSMockHttp, SoftLayerDNSMockHttp)
+        SoftLayerDNSDriver.connectionCls.conn_class = SoftLayerDNSMockHttp
         SoftLayerDNSMockHttp.type = None
         self.driver = SoftLayerDNSDriver(*SOFTLAYER_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_vultr.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_vultr.py b/libcloud/test/dns/test_vultr.py
index abbc570..2a1a848 100644
--- a/libcloud/test/dns/test_vultr.py
+++ b/libcloud/test/dns/test_vultr.py
@@ -31,8 +31,7 @@ class VultrTests(unittest.TestCase):
 
     def setUp(self):
         VultrMockHttp.type = None
-        VultrDNSDriver.connectionCls.conn_classes = (
-            None, VultrMockHttp)
+        VultrDNSDriver.connectionCls.conn_class = VultrMockHttp
         self.driver = VultrDNSDriver(*VULTR_PARAMS)
         self.test_zone = Zone(id='test.com', type='master', ttl=None,
                               domain='test.com', extra={}, driver=self)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_worldwidedns.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_worldwidedns.py b/libcloud/test/dns/test_worldwidedns.py
index 388e5c0..ccd54b7 100644
--- a/libcloud/test/dns/test_worldwidedns.py
+++ b/libcloud/test/dns/test_worldwidedns.py
@@ -31,8 +31,7 @@ from libcloud.test.secrets import DNS_PARAMS_WORLDWIDEDNS
 
 class WorldWideDNSTests(unittest.TestCase):
     def setUp(self):
-        WorldWideDNSDriver.connectionCls.conn_classes = (
-            None, WorldWideDNSMockHttp)
+        WorldWideDNSDriver.connectionCls.conn_class = WorldWideDNSMockHttp
         WorldWideDNSMockHttp.type = None
         self.driver = WorldWideDNSDriver(*DNS_PARAMS_WORLDWIDEDNS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_zerigo.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_zerigo.py b/libcloud/test/dns/test_zerigo.py
index 7897c00..ec4141f 100644
--- a/libcloud/test/dns/test_zerigo.py
+++ b/libcloud/test/dns/test_zerigo.py
@@ -29,8 +29,7 @@ from libcloud.test.secrets import DNS_PARAMS_ZERIGO
 
 class ZerigoTests(unittest.TestCase):
     def setUp(self):
-        ZerigoDNSDriver.connectionCls.conn_classes = (
-            None, ZerigoMockHttp)
+        ZerigoDNSDriver.connectionCls.conn_class = ZerigoMockHttp
         ZerigoMockHttp.type = None
         self.driver = ZerigoDNSDriver(*DNS_PARAMS_ZERIGO)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/dns/test_zonomi.py
----------------------------------------------------------------------
diff --git a/libcloud/test/dns/test_zonomi.py b/libcloud/test/dns/test_zonomi.py
index 186e2f5..302ead3 100644
--- a/libcloud/test/dns/test_zonomi.py
+++ b/libcloud/test/dns/test_zonomi.py
@@ -31,7 +31,7 @@ from libcloud.dns.base import Zone, Record
 class ZonomiTests(unittest.TestCase):
 
     def setUp(self):
-        ZonomiDNSDriver.connectionCls.conn_classes = (None, ZonomiMockHttp)
+        ZonomiDNSDriver.connectionCls.conn_class = ZonomiMockHttp
         ZonomiMockHttp.type = None
         self.driver = ZonomiDNSDriver(*DNS_PARAMS_ZONOMI)
         self.test_zone = Zone(id='zone.com', domain='zone.com',

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/loadbalancer/test_brightbox.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_brightbox.py b/libcloud/test/loadbalancer/test_brightbox.py
index 2509d13..ba95c64 100644
--- a/libcloud/test/loadbalancer/test_brightbox.py
+++ b/libcloud/test/loadbalancer/test_brightbox.py
@@ -28,8 +28,7 @@ from libcloud.test.file_fixtures import LoadBalancerFileFixtures
 
 class BrightboxLBTests(unittest.TestCase):
     def setUp(self):
-        BrightboxLBDriver.connectionCls.conn_classes = (None,
-                                                        BrightboxLBMockHttp)
+        BrightboxLBDriver.connectionCls.conn_class = BrightboxLBMockHttp
         BrightboxLBMockHttp.type = None
         self.driver = BrightboxLBDriver(*LB_BRIGHTBOX_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/loadbalancer/test_cloudstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_cloudstack.py b/libcloud/test/loadbalancer/test_cloudstack.py
index 05f3cbc..4218f6e 100644
--- a/libcloud/test/loadbalancer/test_cloudstack.py
+++ b/libcloud/test/loadbalancer/test_cloudstack.py
@@ -21,8 +21,7 @@ from libcloud.test.file_fixtures import LoadBalancerFileFixtures
 
 class CloudStackLBTests(unittest.TestCase):
     def setUp(self):
-        CloudStackLBDriver.connectionCls.conn_classes = \
-            (None, CloudStackMockHttp)
+        CloudStackLBDriver.connectionCls.conn_class = CloudStackMockHttp
 
         CloudStackLBDriver.path = '/test/path'
         CloudStackLBDriver.type = -1

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/loadbalancer/test_dimensiondata.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_dimensiondata.py b/libcloud/test/loadbalancer/test_dimensiondata.py
index 2b6a1f9..d5b84ad 100644
--- a/libcloud/test/loadbalancer/test_dimensiondata.py
+++ b/libcloud/test/loadbalancer/test_dimensiondata.py
@@ -32,7 +32,7 @@ from libcloud.test.secrets import DIMENSIONDATA_PARAMS
 class DimensionDataTests(unittest.TestCase):
 
     def setUp(self):
-        DimensionData.connectionCls.conn_classes = (None, DimensionDataMockHttp)
+        DimensionData.connectionCls.conn_class = DimensionDataMockHttp
         DimensionDataMockHttp.type = None
         self.driver = DimensionData(*DIMENSIONDATA_PARAMS)
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/loadbalancer/test_elb.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_elb.py b/libcloud/test/loadbalancer/test_elb.py
index 88f5555..31213e8 100644
--- a/libcloud/test/loadbalancer/test_elb.py
+++ b/libcloud/test/loadbalancer/test_elb.py
@@ -29,8 +29,7 @@ from libcloud.test.file_fixtures import LoadBalancerFileFixtures
 class ElasticLBTests(unittest.TestCase):
     def setUp(self):
         ElasticLBMockHttp.test = self
-        ElasticLBDriver.connectionCls.conn_classes = (None,
-                                                      ElasticLBMockHttp)
+        ElasticLBDriver.connectionCls.conn_class = ElasticLBMockHttp
         ElasticLBMockHttp.type = None
         ElasticLBMockHttp.use_param = 'Action'
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/loadbalancer/test_gce.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_gce.py b/libcloud/test/loadbalancer/test_gce.py
index 41d0594..8d5384f 100644
--- a/libcloud/test/loadbalancer/test_gce.py
+++ b/libcloud/test/loadbalancer/test_gce.py
@@ -32,10 +32,9 @@ class GCELoadBalancerTest(GoogleTestCase):
 
     def setUp(self):
         GCEMockHttp.test = self
-        GCELBDriver.connectionCls.conn_classes = (GCEMockHttp, GCEMockHttp)
-        GCENodeDriver.connectionCls.conn_classes = (GCEMockHttp, GCEMockHttp)
-        GoogleBaseAuthConnection.conn_classes = (GoogleAuthMockHttp,
-                                                 GoogleAuthMockHttp)
+        GCELBDriver.connectionCls.conn_class = GCEMockHttp
+        GCENodeDriver.connectionCls.conn_class = GCEMockHttp
+        GoogleBaseAuthConnection.conn_class = GoogleAuthMockHttp
         GCEMockHttp.type = None
         kwargs = GCE_KEYWORD_PARAMS.copy()
         kwargs['auth_type'] = 'IA'

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/loadbalancer/test_gogrid.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_gogrid.py b/libcloud/test/loadbalancer/test_gogrid.py
index 5ad3e80..53ce120 100644
--- a/libcloud/test/loadbalancer/test_gogrid.py
+++ b/libcloud/test/loadbalancer/test_gogrid.py
@@ -32,8 +32,7 @@ from libcloud.test.file_fixtures import LoadBalancerFileFixtures
 class GoGridTests(unittest.TestCase):
 
     def setUp(self):
-        GoGridLBDriver.connectionCls.conn_classes = (None,
-                                                     GoGridLBMockHttp)
+        GoGridLBDriver.connectionCls.conn_class = GoGridLBMockHttp
         GoGridLBMockHttp.type = None
         self.driver = GoGridLBDriver('user', 'key')
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/loadbalancer/test_rackspace.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_rackspace.py b/libcloud/test/loadbalancer/test_rackspace.py
index 9b78395..1eefeb8 100644
--- a/libcloud/test/loadbalancer/test_rackspace.py
+++ b/libcloud/test/loadbalancer/test_rackspace.py
@@ -42,8 +42,7 @@ from libcloud.test.file_fixtures import OpenStackFixtures
 class RackspaceLBTests(unittest.TestCase):
 
     def setUp(self):
-        RackspaceLBDriver.connectionCls.conn_classes = (None,
-                                                        RackspaceLBMockHttp)
+        RackspaceLBDriver.connectionCls.conn_class = RackspaceLBMockHttp
         RackspaceLBMockHttp.type = None
         self.driver = RackspaceLBDriver('user', 'key')
         self.driver.connection.poll_interval = 0.0
@@ -168,8 +167,7 @@ class RackspaceLBTests(unittest.TestCase):
         self.assertEqual(balancer.id, '8290')
 
     def test_ex_create_balancer(self):
-        RackspaceLBDriver.connectionCls.conn_classes = (None,
-                                                        RackspaceLBWithVIPMockHttp)
+        RackspaceLBDriver.connectionCls.conn_class = RackspaceLBWithVIPMockHttp
         RackspaceLBMockHttp.type = None
         driver = RackspaceLBDriver('user', 'key')
         balancer = driver.ex_create_balancer(name='test2',
@@ -919,8 +917,7 @@ class RackspaceLBTests(unittest.TestCase):
 class RackspaceUKLBTests(RackspaceLBTests):
 
     def setUp(self):
-        RackspaceLBDriver.connectionCls.conn_classes = (None,
-                                                        RackspaceLBMockHttp)
+        RackspaceLBDriver.connectionCls.conn_class = RackspaceLBMockHttp
         RackspaceLBMockHttp.type = None
         self.driver = RackspaceUKLBDriver('user', 'key')
         # normally authentication happens lazily, but we force it here

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/loadbalancer/test_slb.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_slb.py b/libcloud/test/loadbalancer/test_slb.py
index 0325cb2..e7d7546 100644
--- a/libcloud/test/loadbalancer/test_slb.py
+++ b/libcloud/test/loadbalancer/test_slb.py
@@ -34,8 +34,7 @@ class SLBDriverTestCases(unittest.TestCase):
 
     def setUp(self):
         SLBMockHttp.test = self
-        SLBDriver.connectionCls.conn_classes = (None,
-                                                SLBMockHttp)
+        SLBDriver.connectionCls.conn_class = SLBMockHttp
         SLBMockHttp.type = None
         SLBMockHttp.use_param = 'Action'
 

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/loadbalancer/test_softlayer.py
----------------------------------------------------------------------
diff --git a/libcloud/test/loadbalancer/test_softlayer.py b/libcloud/test/loadbalancer/test_softlayer.py
index 90499be..ea19e79 100644
--- a/libcloud/test/loadbalancer/test_softlayer.py
+++ b/libcloud/test/loadbalancer/test_softlayer.py
@@ -32,8 +32,7 @@ from libcloud.test.file_fixtures import LoadBalancerFileFixtures
 class SoftlayerLBTests(unittest.TestCase):
     def setUp(self):
 
-        SoftlayerLBDriver.connectionCls.conn_classes = (SoftLayerMockHttp,
-                                                        SoftLayerMockHttp)
+        SoftlayerLBDriver.connectionCls.conn_class = SoftLayerMockHttp
         SoftLayerMockHttp.type = None
 
         self.driver = SoftlayerLBDriver(*SOFTLAYER_PARAMS)

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/storage/test_atmos.py
----------------------------------------------------------------------
diff --git a/libcloud/test/storage/test_atmos.py b/libcloud/test/storage/test_atmos.py
index 561ac2f..27287eb 100644
--- a/libcloud/test/storage/test_atmos.py
+++ b/libcloud/test/storage/test_atmos.py
@@ -40,7 +40,7 @@ from libcloud.test.file_fixtures import StorageFileFixtures
 class AtmosTests(unittest.TestCase):
 
     def setUp(self):
-        AtmosDriver.connectionCls.conn_classes = (None, AtmosMockHttp)
+        AtmosDriver.connectionCls.conn_class = AtmosMockHttp
         AtmosDriver.connectionCls.rawResponseCls = AtmosMockRawResponse
         AtmosDriver.path = ''
         AtmosMockHttp.type = None

http://git-wip-us.apache.org/repos/asf/libcloud/blob/6fd28b6b/libcloud/test/storage/test_azure_blobs.py
----------------------------------------------------------------------
diff --git a/libcloud/test/storage/test_azure_blobs.py b/libcloud/test/storage/test_azure_blobs.py
index f9ee585..9f42298 100644
--- a/libcloud/test/storage/test_azure_blobs.py
+++ b/libcloud/test/storage/test_azure_blobs.py
@@ -374,8 +374,7 @@ class AzureBlobsTests(unittest.TestCase):
         return self.driver_type(*self.driver_args)
 
     def setUp(self):
-        self.driver_type.connectionCls.conn_classes = (None,
-                                                       self.mock_response_klass)
+        self.driver_type.connectionCls.conn_class = self.mock_response_klass
         self.driver_type.connectionCls.rawResponseCls = \
             self.mock_raw_response_klass
         self.mock_response_klass.type = None


Mime
View raw message