diff options
author | Kyrylo Romanenko <kromanenko@mirantis.com> | 2016-07-05 12:16:18 +0300 |
---|---|---|
committer | Steve Martinelli <s.martinelli@gmail.com> | 2016-07-05 15:39:03 +0000 |
commit | 259b4a14628b5eae5f9154a052381145e7e7ba1e (patch) | |
tree | f3449aa2857717436e1b4128a6e713a60f566783 /functional/tests/network/v2/test_security_group.py | |
parent | 44d4188149faa53d377adf6af6a64a1f6403ce43 (diff) | |
download | python-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/network/v2/test_security_group.py')
-rw-r--r-- | functional/tests/network/v2/test_security_group.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/functional/tests/network/v2/test_security_group.py b/functional/tests/network/v2/test_security_group.py index 4fc4d12d..2a3b92a0 100644 --- a/functional/tests/network/v2/test_security_group.py +++ b/functional/tests/network/v2/test_security_group.py @@ -24,7 +24,7 @@ class SecurityGroupTests(test.TestCase): @classmethod def setUpClass(cls): - opts = cls.get_show_opts(cls.FIELDS) + opts = cls.get_opts(cls.FIELDS) raw_output = cls.openstack('security group create ' + cls.NAME + opts) expected = cls.NAME + '\n' cls.assertOutput(expected, raw_output) @@ -40,7 +40,7 @@ class SecurityGroupTests(test.TestCase): cls.assertOutput('', raw_output) def test_security_group_list(self): - opts = self.get_list_opts(self.HEADERS) + opts = self.get_opts(self.HEADERS) raw_output = self.openstack('security group list' + opts) self.assertIn(self.NAME, raw_output) @@ -50,11 +50,11 @@ class SecurityGroupTests(test.TestCase): ) self.assertEqual('', raw_output) - opts = self.get_show_opts(['description']) + opts = self.get_opts(['description']) raw_output = self.openstack('security group show ' + self.NAME + opts) self.assertEqual("NSA\n", raw_output) def test_security_group_show(self): - opts = self.get_show_opts(self.FIELDS) + opts = self.get_opts(self.FIELDS) raw_output = self.openstack('security group show ' + self.NAME + opts) self.assertEqual(self.NAME + "\n", raw_output) |