diff options
| author | Brant Knudson <bknudson@us.ibm.com> | 2015-07-24 15:52:57 -0500 |
|---|---|---|
| committer | Brant Knudson <bknudson@us.ibm.com> | 2015-08-04 09:56:44 -0500 |
| commit | 0c2fef51d2b90df088d30e9b6c5079caae7c6578 (patch) | |
| tree | 349ba613dd991b3d9a8be1e74476e7e9be316e73 /keystoneclient/tests/unit/test_https.py | |
| parent | ada04acf4d60eafc0e31e6ac079ddb2c4f12e728 (diff) | |
| download | python-keystoneclient-0c2fef51d2b90df088d30e9b6c5079caae7c6578.tar.gz | |
Proper deprecation for HTTPClient.request methods
HTTPClient.request and related methods weren't properly
deprecated since they were only mentioned in the docstrings.
Proper deprecation requires use of warnings/debtcollector and
documentation.
Also, fixed places where the deprecated request method was called.
bp deprecations
Change-Id: I0a16933252937ca046793bb6eb2e5cc5da03c9ae
Diffstat (limited to 'keystoneclient/tests/unit/test_https.py')
| -rw-r--r-- | keystoneclient/tests/unit/test_https.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/keystoneclient/tests/unit/test_https.py b/keystoneclient/tests/unit/test_https.py index 77ddf80..bf93226 100644 --- a/keystoneclient/tests/unit/test_https.py +++ b/keystoneclient/tests/unit/test_https.py @@ -47,7 +47,8 @@ class ClientTest(utils.TestCase): MOCK_REQUEST.return_value = FAKE_RESPONSE cl = get_authed_client() - resp, body = cl.get("/hi") + with self.deprecations.expect_deprecations_here(): + resp, body = cl.get("/hi") # this may become too tightly couple later mock_args, mock_kwargs = MOCK_REQUEST.call_args @@ -66,7 +67,8 @@ class ClientTest(utils.TestCase): MOCK_REQUEST.return_value = FAKE_RESPONSE cl = get_authed_client() - cl.post("/hi", body=[1, 2, 3]) + with self.deprecations.expect_deprecations_here(): + cl.post("/hi", body=[1, 2, 3]) # this may become too tightly couple later mock_args, mock_kwargs = MOCK_REQUEST.call_args @@ -87,7 +89,8 @@ class ClientTest(utils.TestCase): cert="cert.pem") cl.management_url = "https://127.0.0.1:5000" cl.auth_token = "token" - cl.post("/hi", body=[1, 2, 3]) + with self.deprecations.expect_deprecations_here(): + cl.post("/hi", body=[1, 2, 3]) # this may become too tightly couple later mock_args, mock_kwargs = MOCK_REQUEST.call_args |
