mirror of
https://github.com/ansible/awx.git
synced 2026-02-15 02:00:01 -03:30
properly parse CLI arguments for launch endpoints
see: https://github.com/ansible/awx/issues/5093
This commit is contained in:
@@ -128,17 +128,17 @@ class TestOptions(unittest.TestCase):
|
||||
page = OptionsPage.from_json({
|
||||
'actions': {
|
||||
'POST': {
|
||||
'limit': {'type': 'integer'}
|
||||
'max_hosts': {'type': 'integer'}
|
||||
},
|
||||
}
|
||||
})
|
||||
options = ResourceOptionsParser(None, page, 'job_templates', self.parser)
|
||||
options = ResourceOptionsParser(None, page, 'organizations', self.parser)
|
||||
options.build_query_arguments('create', 'POST')
|
||||
assert 'create' in self.parser.choices
|
||||
|
||||
out = StringIO()
|
||||
self.parser.choices['create'].print_help(out)
|
||||
assert '--limit INTEGER' in out.getvalue()
|
||||
assert '--max_hosts INTEGER' in out.getvalue()
|
||||
|
||||
def test_boolean_argument(self):
|
||||
page = OptionsPage.from_json({
|
||||
|
||||
Reference in New Issue
Block a user