diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2014-08-22 17:26:07 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2014-09-08 00:06:52 -0500 |
| commit | ae957b176e5918f41024c00cbc39ea371a0c37c6 (patch) | |
| tree | f087abc03197bdbfbfe07ab46cefde083a487c56 /openstackclient/tests/identity | |
| parent | 3317e0abf694c56cb3b24bdf2b2b10577ea47f6b (diff) | |
| download | python-openstackclient-ae957b176e5918f41024c00cbc39ea371a0c37c6.tar.gz | |
Use Keystone client session.Session
This replaces the restapi requests wrapper with the one from Keystone client so
we can take advantage of the auth plugins.
As a first step only the v2 and v3 token and password plugins are supported.
This maintainis no changes to the command options or environment variables.
The next steps will include reworking the other API client interfaces to
fully utilize the single auth session.
Blueprint: ksc-session-auth
Change-Id: I47ec63291e4c3cf36c8061299a4764f60b36ab89
Diffstat (limited to 'openstackclient/tests/identity')
| -rw-r--r-- | openstackclient/tests/identity/v2_0/fakes.py | 1 | ||||
| -rw-r--r-- | openstackclient/tests/identity/v2_0/test_token.py | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/openstackclient/tests/identity/v2_0/fakes.py b/openstackclient/tests/identity/v2_0/fakes.py index a8438e96..b136f841 100644 --- a/openstackclient/tests/identity/v2_0/fakes.py +++ b/openstackclient/tests/identity/v2_0/fakes.py @@ -125,7 +125,6 @@ class FakeIdentityv2Client(object): def __init__(self, **kwargs): self.roles = mock.Mock() self.roles.resource_class = fakes.FakeResource(None, {}) - self.service_catalog = mock.Mock() self.services = mock.Mock() self.services.resource_class = fakes.FakeResource(None, {}) self.tenants = mock.Mock() diff --git a/openstackclient/tests/identity/v2_0/test_token.py b/openstackclient/tests/identity/v2_0/test_token.py index e094ad4a..4184326c 100644 --- a/openstackclient/tests/identity/v2_0/test_token.py +++ b/openstackclient/tests/identity/v2_0/test_token.py @@ -13,6 +13,8 @@ # under the License. # +import mock + from openstackclient.identity.v2_0 import token from openstackclient.tests.identity.v2_0 import fakes as identity_fakes @@ -23,8 +25,9 @@ class TestToken(identity_fakes.TestIdentityv2): super(TestToken, self).setUp() # Get a shortcut to the Service Catalog Mock - self.sc_mock = self.app.client_manager.identity.service_catalog - self.sc_mock.reset_mock() + self.sc_mock = mock.Mock() + self.app.client_manager.auth_ref = mock.Mock() + self.app.client_manager.auth_ref.service_catalog = self.sc_mock class TestTokenIssue(TestToken): |
