diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-07-26 10:53:40 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-07-26 10:53:40 +0000 |
| commit | 6da7a127af4a5b7ba5fe92b6f09aefe605edb949 (patch) | |
| tree | a4fa263f120aa942f1b625698f9a1af17fcdac0b /openstackclient/tests/volume | |
| parent | 566b8566c00447b8ee8519debde56ddf0e7bf4cf (diff) | |
| parent | e31408d2a4c524181c37ef565b021c0b729cbbe3 (diff) | |
| download | python-openstackclient-6da7a127af4a5b7ba5fe92b6f09aefe605edb949.tar.gz | |
Merge "Add options to "volume type list" command"
Diffstat (limited to 'openstackclient/tests/volume')
| -rw-r--r-- | openstackclient/tests/volume/v2/test_type.py | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/openstackclient/tests/volume/v2/test_type.py b/openstackclient/tests/volume/v2/test_type.py index e148bba4..9cf0f2fe 100644 --- a/openstackclient/tests/volume/v2/test_type.py +++ b/openstackclient/tests/volume/v2/test_type.py @@ -199,23 +199,50 @@ class TestTypeList(TestType): def test_type_list_without_options(self): arglist = [] verifylist = [ - ("long", False) + ("long", False), + ("private", False), + ("public", False), ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) columns, data = self.cmd.take_action(parsed_args) + self.types_mock.list.assert_called_once_with(is_public=None) self.assertEqual(self.columns, columns) self.assertEqual(self.data, list(data)) def test_type_list_with_options(self): - arglist = ["--long"] - verifylist = [("long", True)] + arglist = [ + "--long", + "--public", + ] + verifylist = [ + ("long", True), + ("private", False), + ("public", True), + ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) columns, data = self.cmd.take_action(parsed_args) + self.types_mock.list.assert_called_once_with(is_public=True) self.assertEqual(self.columns_long, columns) self.assertEqual(self.data_long, list(data)) + def test_type_list_with_private_option(self): + arglist = [ + "--private", + ] + verifylist = [ + ("long", False), + ("private", True), + ("public", False), + ] + parsed_args = self.check_parser(self.cmd, arglist, verifylist) + + columns, data = self.cmd.take_action(parsed_args) + self.types_mock.list.assert_called_once_with(is_public=False) + self.assertEqual(self.columns, columns) + self.assertEqual(self.data, list(data)) + class TestTypeSet(TestType): |
