summaryrefslogtreecommitdiff
path: root/openstackclient/tests/common
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2014-10-17 22:26:57 -0500
committerDean Troyer <dtroyer@gmail.com>2014-10-18 00:01:45 -0500
commit0de67016c7daa1712b568cb2e49728fac3eb57ad (patch)
tree9a3e4f893b89983fe1d981663057922d47eb4b94 /openstackclient/tests/common
parent68130fa92182760882def8d3a3a97fcde5d355a1 (diff)
downloadpython-openstackclient-0de67016c7daa1712b568cb2e49728fac3eb57ad.tar.gz
Remove now-unnecessary client creation hacks
Clients that can use ksc Session don't need the old junk to fake auth anymore: * compute * volume Clients that still need to be fed credentials can pick directly from the auth object in clientmanager. The _token attribute is removed, the token can be retrieved from the auth object: openstackclient/tests/common/test_clientmanager.py This change will break any plugin that relies on getting a token from instance._token. They should be updated to use the above, or preferable, to use keystoneclient.session.Session to create its HTTP interface object. Change-Id: I877a29de97a42f85f12a14c274fc003e6fba5135
Diffstat (limited to 'openstackclient/tests/common')
-rw-r--r--openstackclient/tests/common/test_clientmanager.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/openstackclient/tests/common/test_clientmanager.py b/openstackclient/tests/common/test_clientmanager.py
index d0738c79..24adfa0e 100644
--- a/openstackclient/tests/common/test_clientmanager.py
+++ b/openstackclient/tests/common/test_clientmanager.py
@@ -89,10 +89,9 @@ class TestClientManager(utils.TestCase):
fakes.AUTH_URL,
client_manager._url,
)
-
self.assertEqual(
fakes.AUTH_TOKEN,
- client_manager._token,
+ client_manager.auth.get_token(None),
)
self.assertIsInstance(
client_manager.auth,
@@ -112,10 +111,6 @@ class TestClientManager(utils.TestCase):
)
self.assertEqual(
- fakes.AUTH_TOKEN,
- client_manager._token,
- )
- self.assertEqual(
fakes.AUTH_URL,
client_manager._auth_url,
)
@@ -161,10 +156,6 @@ class TestClientManager(utils.TestCase):
client_manager.auth_ref,
)
self.assertEqual(
- fakes.AUTH_TOKEN,
- client_manager._token,
- )
- self.assertEqual(
dir(SERVICE_CATALOG),
dir(client_manager._service_catalog),
)