summaryrefslogtreecommitdiff
path: root/functional/common/test.py
diff options
context:
space:
mode:
authorKyrylo Romanenko <kromanenko@mirantis.com>2016-07-14 14:09:18 +0300
committerKyrylo Romanenko <kromanenko@mirantis.com>2016-07-14 14:09:18 +0300
commit9f346c3fb6eb25ed581139992380c53580c1cd42 (patch)
tree0a5dc3ebeb1ba4919cdb5cd79e0cba29372c37c5 /functional/common/test.py
parent52cb503fb0e9d1ba43fc048e127ec0206cde4a61 (diff)
downloadpython-openstackclient-9f346c3fb6eb25ed581139992380c53580c1cd42.tar.gz
Allow format selection in get_opts
Default is "value". Change-Id: I244253f6cd53104a57ef12f6b14e1653c89d38bc
Diffstat (limited to 'functional/common/test.py')
-rw-r--r--functional/common/test.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/functional/common/test.py b/functional/common/test.py
index fa523d7d..f7f0361e 100644
--- a/functional/common/test.py
+++ b/functional/common/test.py
@@ -58,8 +58,9 @@ class TestCase(testtools.TestCase):
return cls.openstack('configuration show ' + opts)
@classmethod
- def get_opts(cls, fields):
- return ' -f value ' + ' '.join(['-c ' + it for it in fields])
+ def get_opts(cls, fields, format='value'):
+ return ' -f {0} {1}'.format(format,
+ ' '.join(['-c ' + it for it in fields]))
@classmethod
def assertOutput(cls, expected, actual):