summaryrefslogtreecommitdiff
path: root/keystoneclient/tests/test_https.py
diff options
context:
space:
mode:
authorJamie Lennox <jamielennox@redhat.com>2014-03-21 16:59:09 +1000
committerJamie Lennox <jamielennox@redhat.com>2014-03-21 16:59:09 +1000
commit6d1f907061c85c6a4550379eab3c11cdcc45def4 (patch)
tree870297578f88d06cb578dcf6fd271d9a0160e9df /keystoneclient/tests/test_https.py
parentb63bd9c3d8c1f47a9354242eaee196713edde01f (diff)
downloadpython-keystoneclient-6d1f907061c85c6a4550379eab3c11cdcc45def4.tar.gz
Don't use a connection pool unless provided
To prevent left over TCP connections from keystoneclient not correctly cleaning up we shouldn't use a connection pool. This is not ideal but it was a relatively new addition so shouldn't affect performance. When we are able to find a long term solution to keystoneclient's other problems we can move back to using a connection pool. Change-Id: I45678ef89b88eea90ea04de1e3170f584b51fd8f Closes-Bug: #1282089
Diffstat (limited to 'keystoneclient/tests/test_https.py')
-rw-r--r--keystoneclient/tests/test_https.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/keystoneclient/tests/test_https.py b/keystoneclient/tests/test_https.py
index 729f014..f9618be 100644
--- a/keystoneclient/tests/test_https.py
+++ b/keystoneclient/tests/test_https.py
@@ -14,7 +14,6 @@ import mock
import requests
from keystoneclient import httpclient
-from keystoneclient import session
from keystoneclient.tests import utils
@@ -50,7 +49,7 @@ class ClientTest(utils.TestCase):
self.request_patcher.start()
self.addCleanup(self.request_patcher.stop)
- @mock.patch.object(session.requests.Session, 'request')
+ @mock.patch.object(requests, 'request')
def test_get(self, MOCK_REQUEST):
MOCK_REQUEST.return_value = FAKE_RESPONSE
cl = get_authed_client()
@@ -69,7 +68,7 @@ class ClientTest(utils.TestCase):
# Automatic JSON parsing
self.assertEqual(body, {"hi": "there"})
- @mock.patch.object(session.requests.Session, 'request')
+ @mock.patch.object(requests, 'request')
def test_post(self, MOCK_REQUEST):
MOCK_REQUEST.return_value = FAKE_RESPONSE
cl = get_authed_client()
@@ -86,7 +85,7 @@ class ClientTest(utils.TestCase):
self.assertEqual(mock_kwargs['cert'], ('cert.pem', 'key.pem'))
self.assertEqual(mock_kwargs['verify'], 'ca.pem')
- @mock.patch.object(session.requests.Session, 'request')
+ @mock.patch.object(requests, 'request')
def test_post_auth(self, MOCK_REQUEST):
MOCK_REQUEST.return_value = FAKE_RESPONSE
cl = httpclient.HTTPClient(