diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-03-01 07:18:10 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-03-01 07:18:10 +0000 |
| commit | 2ecbb738ef668cef2ae94ccc86e9c787363896b7 (patch) | |
| tree | 8f39d14f175f95c8e08049616ecac0e5d27959fb /openstackclient/tests/compute/v2/test_security_group.py | |
| parent | 0dfc50ea1c549a4a65ffdbc4d53a4897b4879691 (diff) | |
| parent | 842882f3cbfca6df9a42bc49b0deefdb84509a8e (diff) | |
| download | python-openstackclient-2ecbb738ef668cef2ae94ccc86e9c787363896b7.tar.gz | |
Merge "Refactor security group list to use SDK"
Diffstat (limited to 'openstackclient/tests/compute/v2/test_security_group.py')
| -rw-r--r-- | openstackclient/tests/compute/v2/test_security_group.py | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/openstackclient/tests/compute/v2/test_security_group.py b/openstackclient/tests/compute/v2/test_security_group.py index c6998cb5..01e27b82 100644 --- a/openstackclient/tests/compute/v2/test_security_group.py +++ b/openstackclient/tests/compute/v2/test_security_group.py @@ -125,65 +125,3 @@ class TestSecurityGroupCreate(TestSecurityGroup): self.assertEqual(self.columns, columns) self.assertEqual(self.data, data) - - -class TestSecurityGroupList(TestSecurityGroup): - - def setUp(self): - super(TestSecurityGroupList, self).setUp() - - self.secgroups_mock.list.return_value = [ - FakeSecurityGroupResource( - None, - copy.deepcopy(SECURITY_GROUP), - loaded=True, - ), - ] - - # Get the command object to test - self.cmd = security_group.ListSecurityGroup(self.app, None) - - def test_security_group_list_no_options(self): - self.projects_mock.list.return_value = [ - fakes.FakeResource( - None, - copy.deepcopy(identity_fakes.PROJECT), - loaded=True, - ), - ] - - arglist = [] - verifylist = [ - ('all_projects', False), - ] - - parsed_args = self.check_parser(self.cmd, arglist, verifylist) - - # In base command class Lister in cliff, abstract method take_action() - # returns a tuple containing the column names and an iterable - # containing the data to be listed. - columns, data = self.cmd.take_action(parsed_args) - - # Set expected values - kwargs = { - 'search_opts': { - 'all_tenants': False, - }, - } - - self.secgroups_mock.list.assert_called_with( - **kwargs - ) - - collist = ( - 'ID', - 'Name', - 'Description', - ) - self.assertEqual(collist, columns) - datalist = (( - security_group_id, - security_group_name, - security_group_description, - ), ) - self.assertEqual(datalist, tuple(data)) |
