summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-03-28 17:33:25 +0000
committerGerrit Code Review <review@openstack.org>2017-03-28 17:33:25 +0000
commitca06a09d4d900f6196eeefb1cbfcef462c12b39c (patch)
tree1c2b6e068a5a9ec81272b9136a8d51bf3bb92a22 /openstackclient/tests/functional
parentdd81ca0692ebe6c4892271da60a1e5eceba8d25c (diff)
parent709eac73fbf0691d8012052773eec73006adf704 (diff)
downloadpython-openstackclient-ca06a09d4d900f6196eeefb1cbfcef462c12b39c.tar.gz
Merge "Fix volume transfers request commands"
Diffstat (limited to 'openstackclient/tests/functional')
-rw-r--r--openstackclient/tests/functional/volume/v1/test_transfer_request.py12
-rw-r--r--openstackclient/tests/functional/volume/v2/test_transfer_request.py12
2 files changed, 14 insertions, 10 deletions
diff --git a/openstackclient/tests/functional/volume/v1/test_transfer_request.py b/openstackclient/tests/functional/volume/v1/test_transfer_request.py
index e03cd717..3fe11913 100644
--- a/openstackclient/tests/functional/volume/v1/test_transfer_request.py
+++ b/openstackclient/tests/functional/volume/v1/test_transfer_request.py
@@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+import json
import uuid
from openstackclient.tests.functional.volume.v1 import common
@@ -67,11 +68,12 @@ class TransferRequestTests(common.BaseVolumeTests):
self.assertNotEqual('', auth_key)
# accept the volume transfer request
- opts = self.get_opts(self.FIELDS)
- raw_output = self.openstack(
- 'volume transfer request accept ' + name +
- ' ' + auth_key + opts)
- self.assertEqual(name + '\n', raw_output)
+ json_output = json.loads(self.openstack(
+ 'volume transfer request accept -f json ' +
+ name + ' ' +
+ '--auth-key ' + auth_key
+ ))
+ self.assertEqual(name, json_output.get('name'))
# the volume transfer will be removed by default after accepted
# so just need to delete the volume here
diff --git a/openstackclient/tests/functional/volume/v2/test_transfer_request.py b/openstackclient/tests/functional/volume/v2/test_transfer_request.py
index 1791f8ac..99d91ac0 100644
--- a/openstackclient/tests/functional/volume/v2/test_transfer_request.py
+++ b/openstackclient/tests/functional/volume/v2/test_transfer_request.py
@@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+import json
import uuid
from openstackclient.tests.functional.volume.v2 import common
@@ -67,11 +68,12 @@ class TransferRequestTests(common.BaseVolumeTests):
self.assertNotEqual('', auth_key)
# accept the volume transfer request
- opts = self.get_opts(self.FIELDS)
- raw_output = self.openstack(
- 'volume transfer request accept ' + name +
- ' ' + auth_key + opts)
- self.assertEqual(name + '\n', raw_output)
+ json_output = json.loads(self.openstack(
+ 'volume transfer request accept -f json ' +
+ name + ' ' +
+ '--auth-key ' + auth_key
+ ))
+ self.assertEqual(name, json_output.get('name'))
# the volume transfer will be removed by default after accepted
# so just need to delete the volume here