summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/common/test_clientmanager.py
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2017-04-24 18:57:05 -0500
committerDean Troyer <dtroyer@gmail.com>2017-04-24 18:57:10 -0500
commitef99f444628282d06feae04514bd2a6328d87b93 (patch)
tree679a61d840cef175b03ba2f12c4ef5b47f932b29 /openstackclient/tests/unit/common/test_clientmanager.py
parentdb6081fb802559cdb6623bbc5dbff597cd287b07 (diff)
downloadpython-openstackclient-ef99f444628282d06feae04514bd2a6328d87b93.tar.gz
Improve no-auth path
The commands that do not require authentication sometimes still need to call ClientManager.is_network_endpoint_enabled() to see if Neutron is available. Optimize the paths a bit to skip auth when it is not necessary; the upshot is Neutron will be assumed in these cases now. This gets a LOT cleaner when it appears is a future osc-lib. Change-Id: Ifaddc57dfa192bde04d0482e2cdcce111313a22a
Diffstat (limited to 'openstackclient/tests/unit/common/test_clientmanager.py')
-rw-r--r--openstackclient/tests/unit/common/test_clientmanager.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/openstackclient/tests/unit/common/test_clientmanager.py b/openstackclient/tests/unit/common/test_clientmanager.py
index 7f82c35d..f15f9af1 100644
--- a/openstackclient/tests/unit/common/test_clientmanager.py
+++ b/openstackclient/tests/unit/common/test_clientmanager.py
@@ -66,4 +66,6 @@ class TestClientManager(osc_lib_test_utils.TestClientManager):
)
self.assertFalse(client_manager.is_service_available('network'))
- self.assertFalse(client_manager.is_network_endpoint_enabled())
+ # This is True because ClientManager.auth_ref returns None in this
+ # test; "no service catalog" means use Network API by default now
+ self.assertTrue(client_manager.is_network_endpoint_enabled())