Merge "Require int value for --limit option"
This commit is contained in:
commit
bc6fa63c9c
@ -80,6 +80,7 @@ class ListConfig(command.Lister):
|
||||
parser.add_argument(
|
||||
'--limit',
|
||||
metavar='<limit>',
|
||||
type=int,
|
||||
help=_('Limit the number of configs returned')
|
||||
)
|
||||
parser.add_argument(
|
||||
|
@ -537,6 +537,7 @@ class ListStack(command.Lister):
|
||||
parser.add_argument(
|
||||
'--limit',
|
||||
metavar='<limit>',
|
||||
type=int,
|
||||
help=_('The number of stacks returned')
|
||||
)
|
||||
parser.add_argument(
|
||||
|
@ -83,7 +83,7 @@ class TestListConfig(TestConfig):
|
||||
arglist = ['--limit', '3']
|
||||
parsed_args = self.check_parser(self.cmd, arglist, [])
|
||||
self.cmd.take_action(parsed_args)
|
||||
self.mock_client.software_configs.list.assert_called_with(limit='3')
|
||||
self.mock_client.software_configs.list.assert_called_with(limit=3)
|
||||
|
||||
def test_config_list_marker(self):
|
||||
arglist = ['--marker', 'id123']
|
||||
|
Loading…
Reference in New Issue
Block a user