summaryrefslogtreecommitdiff
path: root/functional
diff options
context:
space:
mode:
authorTang Chen <chen.tang@easystack.cn>2016-02-17 15:20:36 +0800
committerTang Chen <chen.tang@easystack.cn>2016-02-27 03:47:57 +0800
commit859bfaf8757086c8607c1520c8018ab20e91a3ac (patch)
tree653ff6662c65366c92a8b41b16201d7bc0d49c1e /functional
parentf37eda3a27dc88d3186d21eca328cca086ee3647 (diff)
downloadpython-openstackclient-859bfaf8757086c8607c1520c8018ab20e91a3ac.tar.gz
Make SetSecurityGroup inherit from cliff.Command
set/unset comamnd classes should inherit from cliff.Command class. Change-Id: Ie28711ac8823dc9eb13cf83877864ca436b928bc Partial-Bug: 1546065
Diffstat (limited to 'functional')
-rw-r--r--functional/tests/network/v2/test_security_group.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/functional/tests/network/v2/test_security_group.py b/functional/tests/network/v2/test_security_group.py
index 2089b1d5..4fc4d12d 100644
--- a/functional/tests/network/v2/test_security_group.py
+++ b/functional/tests/network/v2/test_security_group.py
@@ -32,10 +32,9 @@ class SecurityGroupTests(test.TestCase):
@classmethod
def tearDownClass(cls):
# Rename test
- opts = cls.get_show_opts(cls.FIELDS)
raw_output = cls.openstack('security group set --name ' +
- cls.OTHER_NAME + ' ' + cls.NAME + opts)
- cls.assertOutput(cls.OTHER_NAME + "\n", raw_output)
+ cls.OTHER_NAME + ' ' + cls.NAME)
+ cls.assertOutput('', raw_output)
# Delete test
raw_output = cls.openstack('security group delete ' + cls.OTHER_NAME)
cls.assertOutput('', raw_output)
@@ -46,10 +45,14 @@ class SecurityGroupTests(test.TestCase):
self.assertIn(self.NAME, raw_output)
def test_security_group_set(self):
- opts = self.get_show_opts(['description', 'name'])
- raw_output = self.openstack('security group set --description NSA ' +
- self.NAME + opts)
- self.assertEqual("NSA\n" + self.NAME + "\n", raw_output)
+ raw_output = self.openstack(
+ 'security group set --description NSA ' + self.NAME
+ )
+ self.assertEqual('', raw_output)
+
+ opts = self.get_show_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)