mirror of
https://github.com/ansible/awx.git
synced 2026-02-18 11:40:05 -03:30
fix a formatting bug re: required arguments in the CLI
This commit is contained in:
@@ -98,26 +98,6 @@ class TestOptions(unittest.TestCase):
|
||||
self.parser.choices['create'].print_help(out)
|
||||
assert '--first_name TEXT Please specify your first name' in out.getvalue()
|
||||
|
||||
def test_creation_required_argument(self):
|
||||
page = OptionsPage.from_json({
|
||||
'actions': {
|
||||
'POST': {
|
||||
'username': {
|
||||
'type': 'string',
|
||||
'help_text': 'Please specify a username',
|
||||
'required': True
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
options = ResourceOptionsParser(page, self.parser)
|
||||
options.build_query_arguments('create', 'POST')
|
||||
assert 'create' in self.parser.choices
|
||||
|
||||
out = StringIO()
|
||||
self.parser.choices['create'].print_help(out)
|
||||
assert '--username TEXT [REQUIRED] Please specify a username' in out.getvalue()
|
||||
|
||||
def test_creation_required_argument(self):
|
||||
page = OptionsPage.from_json({
|
||||
'actions': {
|
||||
@@ -136,7 +116,7 @@ class TestOptions(unittest.TestCase):
|
||||
|
||||
out = StringIO()
|
||||
self.parser.choices['create'].print_help(out)
|
||||
assert '--username TEXT [REQUIRED] Please specify a username' in out.getvalue()
|
||||
assert '--username TEXT Please specify a username'
|
||||
|
||||
def test_integer_argument(self):
|
||||
page = OptionsPage.from_json({
|
||||
|
||||
Reference in New Issue
Block a user