summaryrefslogtreecommitdiff
path: root/openstackclient/tests/volume
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2015-04-13 16:47:49 -0500
committerDean Troyer <dtroyer@gmail.com>2015-04-15 22:40:52 -0500
commitf43c1f76559ae8b5b738b7ae8b69b15c379f9145 (patch)
tree0312547c04ebfc6ae09119b734945e6bbfcbb651 /openstackclient/tests/volume
parente60bf28ae3bdb34b65316249f0e7615048aa1f95 (diff)
downloadpython-openstackclient-f43c1f76559ae8b5b738b7ae8b69b15c379f9145.tar.gz
Defer client imports
So we really weren't deferring the loading of client libs dadgummit, do that for real where possible. This shaves a couple of tenths off the static import times. Also defer as much import-time procesing as possible. This is a little ugly in api.auth but this also eliminates import of the auth plugins until they are needed. Change-Id: Ia11d4b9cf98231d37449103fc29101dc17afb009
Diffstat (limited to 'openstackclient/tests/volume')
-rw-r--r--openstackclient/tests/volume/test_find_resource.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/openstackclient/tests/volume/test_find_resource.py b/openstackclient/tests/volume/test_find_resource.py
index 56081966..00cc46a6 100644
--- a/openstackclient/tests/volume/test_find_resource.py
+++ b/openstackclient/tests/volume/test_find_resource.py
@@ -24,6 +24,13 @@ from openstackclient.tests import utils as test_utils
from openstackclient.volume import client # noqa
+# Monkey patch for v1 cinderclient
+# NOTE(dtroyer): Do here because openstackclient.volume.client
+# doesn't do it until the client object is created now.
+volumes.Volume.NAME_ATTR = 'display_name'
+volume_snapshots.Snapshot.NAME_ATTR = 'display_name'
+
+
ID = '1after909'
NAME = 'PhilSpector'