summaryrefslogtreecommitdiff
path: root/keystoneclient
diff options
context:
space:
mode:
authorBrant Knudson <bknudson@us.ibm.com>2016-02-28 08:14:28 -0600
committerBrant Knudson <bknudson@us.ibm.com>2016-02-28 08:14:28 -0600
commitc107a05b5e008d1a3f5c0e4ba380994a2798af75 (patch)
tree4bd643a852246aa6f8196e2ddf295231d0027e89 /keystoneclient
parent7d57eceb19aaaca8de84a8701552715fc8153872 (diff)
downloadpython-keystoneclient-c107a05b5e008d1a3f5c0e4ba380994a2798af75.tar.gz
Tests stop using deprecated HTTPClient.get()
Several tests were using httpclient.HTTPClient.get(), which is deprecated for removal. Tests that are not testing .get() need to switch to a different method so that we can eventually remove it. Change-Id: I757abdf2ed24d38b9064a38d33ef98a4614d6bb2
Diffstat (limited to 'keystoneclient')
-rw-r--r--keystoneclient/tests/unit/v2_0/test_auth.py9
-rw-r--r--keystoneclient/tests/unit/v3/test_auth.py12
2 files changed, 7 insertions, 14 deletions
diff --git a/keystoneclient/tests/unit/v2_0/test_auth.py b/keystoneclient/tests/unit/v2_0/test_auth.py
index 83da44c..f9512f6 100644
--- a/keystoneclient/tests/unit/v2_0/test_auth.py
+++ b/keystoneclient/tests/unit/v2_0/test_auth.py
@@ -243,8 +243,7 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
self.assertEqual(cl.auth_token, self.TEST_TOKEN)
# the token returned from the authentication will be used
- with self.deprecations.expect_deprecations_here():
- resp, body = cl.get(fake_url)
+ resp, body = cl._adapter.get(fake_url)
self.assertEqual(fake_resp, body)
token = self.requests_mock.last_request.headers.get('X-Auth-Token')
@@ -253,8 +252,7 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
# then override that token and the new token shall be used
cl.auth_token = fake_token
- with self.deprecations.expect_deprecations_here():
- resp, body = cl.get(fake_url)
+ resp, body = cl._adapter.get(fake_url)
self.assertEqual(fake_resp, body)
token = self.requests_mock.last_request.headers.get('X-Auth-Token')
@@ -263,8 +261,7 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
# if we clear that overridden token then we fall back to the original
del cl.auth_token
- with self.deprecations.expect_deprecations_here():
- resp, body = cl.get(fake_url)
+ resp, body = cl._adapter.get(fake_url)
self.assertEqual(fake_resp, body)
token = self.requests_mock.last_request.headers.get('X-Auth-Token')
diff --git a/keystoneclient/tests/unit/v3/test_auth.py b/keystoneclient/tests/unit/v3/test_auth.py
index 177eb3b..f719905 100644
--- a/keystoneclient/tests/unit/v3/test_auth.py
+++ b/keystoneclient/tests/unit/v3/test_auth.py
@@ -241,8 +241,7 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
body = jsonutils.loads(self.requests_mock.last_request.body)
self.assertEqual(body['auth']['identity']['token']['id'], fake_token)
- with self.deprecations.expect_deprecations_here():
- resp, body = cl.get(fake_url)
+ resp, body = cl._adapter.get(fake_url)
self.assertEqual(fake_resp, body)
token = self.requests_mock.last_request.headers.get('X-Auth-Token')
@@ -348,8 +347,7 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
self.assertEqual(cl.auth_token, self.TEST_TOKEN)
# the token returned from the authentication will be used
- with self.deprecations.expect_deprecations_here():
- resp, body = cl.get(fake_url)
+ resp, body = cl._adapter.get(fake_url)
self.assertEqual(fake_resp, body)
token = self.requests_mock.last_request.headers.get('X-Auth-Token')
@@ -358,8 +356,7 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
# then override that token and the new token shall be used
cl.auth_token = fake_token
- with self.deprecations.expect_deprecations_here():
- resp, body = cl.get(fake_url)
+ resp, body = cl._adapter.get(fake_url)
self.assertEqual(fake_resp, body)
token = self.requests_mock.last_request.headers.get('X-Auth-Token')
@@ -368,8 +365,7 @@ class AuthenticateAgainstKeystoneTests(utils.TestCase):
# if we clear that overridden token then we fall back to the original
del cl.auth_token
- with self.deprecations.expect_deprecations_here():
- resp, body = cl.get(fake_url)
+ resp, body = cl._adapter.get(fake_url)
self.assertEqual(fake_resp, body)
token = self.requests_mock.last_request.headers.get('X-Auth-Token')