You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2013/06/15 05:38:55 UTC
git commit: Set conn_classes attribute on the OpenStackBaseConnection
class.
Updated Branches:
refs/heads/trunk 3985da97c -> 14e375e4c
Set conn_classes attribute on the OpenStackBaseConnection class.
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/14e375e4
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/14e375e4
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/14e375e4
Branch: refs/heads/trunk
Commit: 14e375e4c9227416570821fe74956ae6acacf187
Parents: 3985da9
Author: Tomaz Muraus <to...@apache.org>
Authored: Fri Jun 14 20:30:54 2013 -0700
Committer: Tomaz Muraus <to...@apache.org>
Committed: Fri Jun 14 20:30:54 2013 -0700
----------------------------------------------------------------------
libcloud/test/compute/test_openstack.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/14e375e4/libcloud/test/compute/test_openstack.py
----------------------------------------------------------------------
diff --git a/libcloud/test/compute/test_openstack.py b/libcloud/test/compute/test_openstack.py
index 4dd912e..1d7cbcf 100644
--- a/libcloud/test/compute/test_openstack.py
+++ b/libcloud/test/compute/test_openstack.py
@@ -77,9 +77,12 @@ class OpenStack_1_0_ResponseTestCase(unittest.TestCase):
class OpenStackServiceCatalogTests(unittest.TestCase):
# TODO refactor and move into libcloud/test/common
+ def setUp(self):
+ OpenStackBaseConnection.conn_classes = (OpenStackMockHttp,
+ OpenStackMockHttp)
+
def test_connection_get_service_catalog(self):
connection = OpenStackBaseConnection(*OPENSTACK_PARAMS)
- connection.conn_classes = (OpenStackMockHttp, OpenStackMockHttp)
connection.auth_url = "https://auth.api.example.com/v1.1/"
connection._ex_force_base_url = "https://www.foo.com"
connection.driver = OpenStack_1_0_NodeDriver(*OPENSTACK_PARAMS)
@@ -101,6 +104,7 @@ class OpenStackServiceCatalogTests(unittest.TestCase):
class OpenStackAuthConnectionTests(unittest.TestCase):
# TODO refactor and move into libcloud/test/common
+
def test_basic_authentication(self):
tuples = [
('1.0', OpenStackMockHttp),
@@ -206,8 +210,10 @@ class OpenStackAuthConnectionTests(unittest.TestCase):
self.assertEqual(mocked_auth_method.call_count, 5)
def _get_mock_connection(self, mock_http_class):
+ OpenStackBaseConnection.conn_classes = (mock_http_class,
+ mock_http_class)
+
connection = OpenStackBaseConnection(*OPENSTACK_PARAMS)
- connection.conn_classes = (mock_http_class, mock_http_class)
connection.auth_url = "https://auth.api.example.com/v1.1/"
connection._ex_force_base_url = "https://www.foo.com"
connection.driver = OpenStack_1_0_NodeDriver(*OPENSTACK_PARAMS)