summaryrefslogtreecommitdiff
path: root/functional/tests/object
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/tests/object
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/tests/object')
-rw-r--r--functional/tests/object/v1/test_container.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/functional/tests/object/v1/test_container.py b/functional/tests/object/v1/test_container.py
index 8721a4a7..4f9e843b 100644
--- a/functional/tests/object/v1/test_container.py
+++ b/functional/tests/object/v1/test_container.py
@@ -21,10 +21,9 @@ class ContainerTests(test.TestCase):
@classmethod
def setUpClass(cls):
- opts = cls.get_list_opts(['container'])
+ opts = cls.get_opts(['container'])
raw_output = cls.openstack('container create ' + cls.NAME + opts)
- expected = '"container"\n"' + cls.NAME + '"\n'
- cls.assertOutput(expected, raw_output)
+ cls.assertOutput(cls.NAME + '\n', raw_output)
@classmethod
def tearDownClass(cls):
@@ -32,11 +31,11 @@ class ContainerTests(test.TestCase):
cls.assertOutput('', raw_output)
def test_container_list(self):
- opts = self.get_list_opts(['Name'])
+ opts = self.get_opts(['Name'])
raw_output = self.openstack('container list' + opts)
self.assertIn(self.NAME, raw_output)
def test_container_show(self):
- opts = self.get_show_opts(['container'])
+ opts = self.get_opts(['container'])
raw_output = self.openstack('container show ' + self.NAME + opts)
self.assertEqual(self.NAME + "\n", raw_output)