diff options
author | Ryan Petrello <rpetrell@redhat.com> | 2019-08-22 22:01:00 +0200 |
---|---|---|
committer | Ryan Petrello <rpetrell@redhat.com> | 2019-08-22 23:05:53 +0200 |
commit | 2e8be41111e37b8dd407ad1ced95d6973afd0843 (patch) | |
tree | 28260c7b9627442fd63613f723d5b45b2beda10c /awxkit/test | |
parent | Merge pull request #4535 from AlanCoding/null_ip (diff) | |
download | awx-2e8be41111e37b8dd407ad1ced95d6973afd0843.tar.xz awx-2e8be41111e37b8dd407ad1ced95d6973afd0843.zip |
fix a formatting bug re: required arguments in the CLI
Diffstat (limited to 'awxkit/test')
-rw-r--r-- | awxkit/test/cli/test_options.py | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/awxkit/test/cli/test_options.py b/awxkit/test/cli/test_options.py index f0b22f1178..ff514ffb9a 100644 --- a/awxkit/test/cli/test_options.py +++ b/awxkit/test/cli/test_options.py @@ -110,33 +110,13 @@ class TestOptions(unittest.TestCase): }, } }) - 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': { - 'POST': { - 'username': { - 'type': 'string', - 'help_text': 'Please specify a username', - 'required': True - } - }, - } - }) options = ResourceOptionsParser(page, 'users', 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() + assert '--username TEXT Please specify a username' def test_integer_argument(self): page = OptionsPage.from_json({ |