Merge "Restore client.py for backward compatibility"
This commit is contained in:
18
keystoneclient/client.py
Normal file
18
keystoneclient/client.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from keystoneclient import httpclient
|
||||
|
||||
# Using client.HTTPClient is deprecated. Use httpclient.HTTPClient instead.
|
||||
HTTPClient = httpclient.HTTPClient
|
@@ -152,6 +152,19 @@ class ClientTest(utils.TestCase):
|
||||
httpclient.USER_AGENT)),
|
||||
kwargs['headers'].items())
|
||||
|
||||
def test_client_deprecated(self):
|
||||
# Can resolve symbols from the keystoneclient.client module.
|
||||
# keystoneclient.client was deprecated and renamed to
|
||||
# keystoneclient.httpclient. This tests that keystoneclient.client
|
||||
# can still be used.
|
||||
|
||||
from keystoneclient import client
|
||||
|
||||
# These statements will raise an AttributeError if the symbol isn't
|
||||
# defined in the module.
|
||||
|
||||
client.HTTPClient
|
||||
|
||||
|
||||
class BasicRequestTests(testtools.TestCase):
|
||||
|
||||
|
Reference in New Issue
Block a user