diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2014-10-20 12:47:39 -0500 |
|---|---|---|
| committer | Steve Martinelli <stevemar@ca.ibm.com> | 2014-10-20 18:21:51 +0000 |
| commit | cd368bb81690af5b4e99c0fd71b35fb00c9e0786 (patch) | |
| tree | 75e826df6214c95e8bb41ab9a331919a6765dcd8 /openstackclient/tests/identity/v3/test_token.py | |
| parent | 2166d7d3afbbdc1659e4cffdb7bcd890cd00ec19 (diff) | |
| download | python-openstackclient-cd368bb81690af5b4e99c0fd71b35fb00c9e0786.tar.gz | |
Fix token issue after auth changeup
IssueToken.take_action() was missed in updating the structure of
the ClientManager.
Also, TOKEN_WITH_TENANT_ID in v3 is just wrong...
Closes-Bug: #1383396
Change-Id: If2dd82a26af1d743ee9df73e0c1aebce497bf22e
Diffstat (limited to 'openstackclient/tests/identity/v3/test_token.py')
| -rw-r--r-- | openstackclient/tests/identity/v3/test_token.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/openstackclient/tests/identity/v3/test_token.py b/openstackclient/tests/identity/v3/test_token.py index dbe85555..f43b6f5f 100644 --- a/openstackclient/tests/identity/v3/test_token.py +++ b/openstackclient/tests/identity/v3/test_token.py @@ -13,6 +13,8 @@ # under the License. # +import mock + from openstackclient.identity.v3 import token from openstackclient.tests.identity.v3 import fakes as identity_fakes @@ -23,9 +25,9 @@ class TestToken(identity_fakes.TestIdentityv3): super(TestToken, self).setUp() # Get a shortcut to the Service Catalog Mock - session = self.app.client_manager.identity.session - self.sc_mock = session.auth.auth_ref.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): @@ -40,7 +42,7 @@ class TestTokenIssue(TestToken): verifylist = [] parsed_args = self.check_parser(self.cmd, arglist, verifylist) self.sc_mock.get_token.return_value = \ - identity_fakes.TOKEN_WITH_TENANT_ID + identity_fakes.TOKEN_WITH_PROJECT_ID # DisplayCommandBase.take_action() returns two tuples columns, data = self.cmd.take_action(parsed_args) |
