summaryrefslogtreecommitdiff
path: root/functional/common/test.py
diff options
context:
space:
mode:
authorKyrylo Romanenko <kromanenko@mirantis.com>2016-07-05 12:16:18 +0300
committerSteve Martinelli <s.martinelli@gmail.com>2016-07-05 15:39:03 +0000
commit259b4a14628b5eae5f9154a052381145e7e7ba1e (patch)
treef3449aa2857717436e1b4128a6e713a60f566783 /functional/common/test.py
parent44d4188149faa53d377adf6af6a64a1f6403ce43 (diff)
downloadpython-openstackclient-259b4a14628b5eae5f9154a052381145e7e7ba1e.tar.gz
Deduplicate get_opts methods
One get_opts method can work instead of get_list_opts and get_show_opts both. Remove mutable default value. Change-Id: I9c5683d416f0f3ed4989abab6f152b0341e30a4f
Diffstat (limited to 'functional/common/test.py')
-rw-r--r--functional/common/test.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/functional/common/test.py b/functional/common/test.py
index e882dd64..fa523d7d 100644
--- a/functional/common/test.py
+++ b/functional/common/test.py
@@ -54,18 +54,14 @@ class TestCase(testtools.TestCase):
@classmethod
def get_openstack_configuration_value(cls, configuration):
- opts = cls.get_show_opts([configuration])
+ opts = cls.get_opts([configuration])
return cls.openstack('configuration show ' + opts)
@classmethod
- def get_show_opts(cls, fields=[]):
+ def get_opts(cls, fields):
return ' -f value ' + ' '.join(['-c ' + it for it in fields])
@classmethod
- def get_list_opts(cls, headers=[]):
- return ' -f csv ' + ' '.join(['-c ' + it for it in headers])
-
- @classmethod
def assertOutput(cls, expected, actual):
if expected != actual:
raise Exception(expected + ' != ' + actual)