diff options
| author | Brant Knudson <bknudson@us.ibm.com> | 2015-07-26 08:46:27 -0500 |
|---|---|---|
| committer | Brant Knudson <bknudson@us.ibm.com> | 2015-08-13 19:01:42 -0500 |
| commit | b94a61012ed9749f818e88366c57aa566a39101d (patch) | |
| tree | c22e6382f8f155b76de02c579994ae338c498875 /keystoneclient/tests/unit/test_base.py | |
| parent | 962ab574fd544eb996af1487a5596d7d3b7894b7 (diff) | |
| download | python-keystoneclient-b94a61012ed9749f818e88366c57aa566a39101d.tar.gz | |
Deprecate create v2_0 Client without session
There was a comment to deprecate creating a v2_0 Client
without a session.
bp deprecations
Change-Id: I71ff64754c8f90d184615eeec558718c11a1794a
Diffstat (limited to 'keystoneclient/tests/unit/test_base.py')
| -rw-r--r-- | keystoneclient/tests/unit/test_base.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/keystoneclient/tests/unit/test_base.py b/keystoneclient/tests/unit/test_base.py index 115a35c..601aa33 100644 --- a/keystoneclient/tests/unit/test_base.py +++ b/keystoneclient/tests/unit/test_base.py @@ -36,9 +36,11 @@ class BaseTest(utils.TestCase): self.assertEqual(base.getid(TmpObject), 4) def test_resource_lazy_getattr(self): - self.client = client.Client(token=self.TEST_TOKEN, - auth_url='http://127.0.0.1:5000', - endpoint='http://127.0.0.1:5000') + # Creating a Client not using session is deprecated. + with self.deprecations.expect_deprecations_here(): + self.client = client.Client(token=self.TEST_TOKEN, + auth_url='http://127.0.0.1:5000', + endpoint='http://127.0.0.1:5000') self.useFixture(mockpatch.PatchObject( self.client._adapter, 'get', side_effect=AttributeError, @@ -83,9 +85,13 @@ class ManagerTest(utils.TestCase): def setUp(self): super(ManagerTest, self).setUp() - self.client = client.Client(token=self.TEST_TOKEN, - auth_url='http://127.0.0.1:5000', - endpoint='http://127.0.0.1:5000') + + # Creating a Client not using session is deprecated. + with self.deprecations.expect_deprecations_here(): + self.client = client.Client(token=self.TEST_TOKEN, + auth_url='http://127.0.0.1:5000', + endpoint='http://127.0.0.1:5000') + self.mgr = base.Manager(self.client) self.mgr.resource_class = base.Resource |
