diff --git a/cli/koji_cli/commands.py b/cli/koji_cli/commands.py index a0f4f796..d94209d1 100644 --- a/cli/koji_cli/commands.py +++ b/cli/koji_cli/commands.py @@ -195,7 +195,7 @@ def handle_add_host(goptions, session, args): def handle_edit_host(options, session, args): "[admin] Edit a host" - usage = _("usage: %prog edit-host ... [options]") + usage = _("usage: %prog edit-host [ ...] [options]") parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--arches", help=_("Space or comma-separated list of supported architectures")) parser.add_option("--capacity", type="float", help=_("Capacity of this host")) @@ -514,7 +514,7 @@ def handle_build(options, session, args): def handle_chain_build(options, session, args): # XXX - replace handle_build with this, once chain-building has gotten testing "[build] Build one or more packages from source" - usage = _("usage: %prog chain-build [options] target URL [URL2 [:] URL3 [:] URL4 ...]") + usage = _("usage: %prog chain-build [options] [ [:] [:] ...]") parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--nowait", action="store_true", help=_("Don't wait on build")) @@ -589,7 +589,7 @@ def handle_chain_build(options, session, args): def handle_maven_build(options, session, args): "[build] Build a Maven package from source" usage = _("usage: %prog maven-build [options] ") - usage += _("\n %prog maven-build --ini=CONFIG... [options] target") + usage += _("\n %prog maven-build --ini=CONFIG... [options] ") parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--patches", action="store", metavar="URL", help=_("SCM URL of a directory containing patches to apply to the sources before building")) @@ -5397,7 +5397,6 @@ def handle_spin_livecd(options, session, args): # Usage & option parsing. usage = _("usage: %prog spin-livecd [options] " + " ") - usage += _("\n(Specify the --help global option for a list of other " + parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--wait", action="store_true", help=_("Wait on the livecd creation, even if running in the background")) @@ -5443,7 +5442,6 @@ def handle_spin_livemedia(options, session, args): # Usage & option parsing. usage = _("usage: %prog spin-livemedia [options] " + " ") - usage += _("\n(Specify the --help global option for a list of other " + parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--wait", action="store_true", help=_("Wait on the livemedia creation, even if running in the background")) @@ -5504,7 +5502,6 @@ def handle_spin_appliance(options, session, args): # Usage & option parsing usage = _("usage: %prog spin-appliance [options] " + " ") - usage += _("\n(Specify the --help global option for a list of other " + parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--wait", action="store_true", help=_("Wait on the appliance creation, even if running in the background")) @@ -5554,8 +5551,7 @@ def handle_image_build_indirection(options, session, args): """[build] Create a disk image using other disk images via the Indirection plugin""" usage = _("usage: %prog image-build-indirection [base_image] " + "[utility_image] [indirection_build_template]") - usage += _("\n %prog image-build --config FILE") - usage += _("\n\n(Specify the --help global option for a list of other " + + usage += _("\n %prog image-build --config \n") parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--config", help=_("Use a configuration file to define image-build options " + @@ -5698,8 +5694,7 @@ def handle_image_build(options, session, args): 'liveimg-squashfs', 'tar-gz') usage = _("usage: %prog image-build [options] " + " [ ...]") - usage += _("\n %prog image-build --config FILE") - usage += _("\n\n(Specify the --help global option for a list of other " + + usage += _("\n %prog image-build --config \n") parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--background", action="store_true", help=_("Run the image creation task at a lower priority")) @@ -5963,7 +5958,6 @@ def handle_win_build(options, session, args): """[build] Build a Windows package from source""" # Usage & option parsing usage = _("usage: %prog win-build [options] ") - usage += _("\n(Specify the --help global option for a list of other " + parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--winspec", metavar="URL", help=_("SCM URL to retrieve the build descriptor from. " + \ @@ -6038,7 +6032,7 @@ def handle_win_build(options, session, args): def handle_free_task(goptions, session, args): "[admin] Free a task" - usage = _("usage: %prog free-task [options] [ ...]") + usage = _("usage: %prog free-task [options] [ ...]") parser = OptionParser(usage=get_usage_str(usage)) (options, args) = parser.parse_args(args) activate_session(session, goptions) @@ -6047,16 +6041,16 @@ def handle_free_task(goptions, session, args): try: tlist.append(int(task_id)) except ValueError: - parser.error(_("task-id must be an integer")) + parser.error(_("task_id must be an integer")) if not tlist: - parser.error(_("please specify at least one task-id")) + parser.error(_("please specify at least one task_id")) for task_id in tlist: session.freeTask(task_id) def handle_cancel(goptions, session, args): "[build] Cancel tasks and/or builds" - usage = _("usage: %prog cancel [options] [ ...]") + usage = _("usage: %prog cancel [options] [ ...]") parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--justone", action="store_true", help=_("Do not cancel subtasks")) parser.add_option("--full", action="store_true", help=_("Full cancellation (admin only)")) @@ -6093,7 +6087,7 @@ def handle_cancel(goptions, session, args): def handle_set_task_priority(goptions, session, args): "[admin] Set task priority" - usage = _("usage: %prog set-task-priority [options] --priority= [ ...]") + usage = _("usage: %prog set-task-priority [options] --priority= [ ...]") parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--priority", type="int", help=_("New priority")) parser.add_option("--recurse", action="store_true", default=False, help=_("Change priority of child tasks as well")) @@ -6363,7 +6357,8 @@ def handle_tag_build(opts, session, args): def handle_move_build(opts, session, args): "[bind] 'Move' one or more builds between tags" - parser = OptionParser(usage=get_usage_str(uget_usage_str(usage)) + usage = _("usage: %prog move-build [options] [ ...]") + parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--force", action="store_true", help=_("force operation")) parser.add_option("--nowait", action="store_true", help=_("do not wait on tasks")) parser.add_option("--all", action="store_true", help=_("move all instances of a package, 's are package names")) @@ -6620,7 +6615,7 @@ def anon_handle_download_logs(options, session, args): "[download] Download a logs for package" FAIL_LOG = "task_failed.log" - usage = _("usage: %prog download-logs [options] [ ...]") + usage = _("usage: %prog download-logs [options] [ ...]") usage += _("\n %prog download-logs [options] --nvr [ ...]") usage += _("\n(Specify the --help global option for a list of other help options)") parser = OptionParser(usage=get_usage_str(usage)) @@ -6960,7 +6955,7 @@ def handle_regen_repo(options, session, args): def handle_dist_repo(options, session, args): """Create a yum repo with distribution options""" - usage = _("usage: %prog dist-repo [options] [ ...]") + usage = _("usage: %prog dist-repo [options] [ ...]") parser = OptionParser(usage=get_usage_str(usage)) parser.add_option('--allow-missing-signatures', action='store_true', default=False, @@ -7115,6 +7110,7 @@ def anon_handle_search(options, session, args): def handle_moshimoshi(options, session, args): "[misc] Introduce yourself" + usage = _("usage: %prog moshimoshi [options]") parser = OptionParser(usage=get_usage_str(usage)) (opts, args) = parser.parse_args(args) if len(args) != 0: @@ -7253,7 +7249,7 @@ def handle_add_notification(goptions, session, args): def handle_remove_notification(goptions, session, args): "[monitor] Remove user's notifications" - usage = _("usage: %prog remove-notification [options] [ ...]") + usage = _("usage: %prog remove-notification [options] [ ...]") parser = OptionParser(usage=get_usage_str(usage)) (options, args) = parser.parse_args(args) @@ -7275,7 +7271,7 @@ def handle_remove_notification(goptions, session, args): def handle_edit_notification(goptions, session, args): "[monitor] Edit user's notification" - usage = _("usage: %prog edit-notification [options] ") + usage = _("usage: %prog edit-notification [options] ") parser = OptionParser(usage=get_usage_str(usage)) parser.add_option("--package", help=_("Notifications for this package, '*' for all")) @@ -7383,7 +7379,7 @@ def handle_block_notification(goptions, session, args): def handle_unblock_notification(goptions, session, args): "[monitor] Unblock user's notification" - usage = _("usage: %prog unblock-notification [options] [ ...]") + usage = _("usage: %prog unblock-notification [options] [ ...]") parser = OptionParser(usage=get_usage_str(usage)) (options, args) = parser.parse_args(args) diff --git a/tests/test_cli/test_add_group_pkg.py b/tests/test_cli/test_add_group_pkg.py index 4eddb13f..1531c19b 100644 --- a/tests/test_cli/test_add_group_pkg.py +++ b/tests/test_cli/test_add_group_pkg.py @@ -19,7 +19,7 @@ class TestAddGroupPkg(utils.CliTestCase): self.options = mock.MagicMock() self.activate_session = mock.patch('koji_cli.commands.activate_session').start() - self.error_format = """Usage: %s add-group-pkg [options] [...] + self.error_format = """Usage: %s add-group-pkg [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -54,7 +54,7 @@ class TestAddGroupPkg(utils.CliTestCase): def test_handle_add_group_pkg_help(self): self.assert_help( handle_add_group_pkg, - """Usage: %s add-group-pkg [options] [...] + """Usage: %s add-group-pkg [options] [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_add_host.py b/tests/test_cli/test_add_host.py index 11b83f01..94260adc 100644 --- a/tests/test_cli/test_add_host.py +++ b/tests/test_cli/test_add_host.py @@ -116,7 +116,7 @@ class TestAddHost(unittest.TestCase): actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s add-host [options] hostname arch [arch2 ...] + expected_stderr = """Usage: %s add-host [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: Please specify a hostname and at least one arch diff --git a/tests/test_cli/test_add_host_to_channel.py b/tests/test_cli/test_add_host_to_channel.py index 80ebf18c..9220bfe0 100644 --- a/tests/test_cli/test_add_host_to_channel.py +++ b/tests/test_cli/test_add_host_to_channel.py @@ -182,7 +182,7 @@ class TestAddHostToChannel(unittest.TestCase): actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s add-host-to-channel [options] hostname channel + expected_stderr = """Usage: %s add-host-to-channel [options] (Specify the --help global option for a list of other help options) %s: error: Please specify a hostname and a channel diff --git a/tests/test_cli/test_add_pkg.py b/tests/test_cli/test_add_pkg.py index 8072a181..2a3a8239 100644 --- a/tests/test_cli/test_add_pkg.py +++ b/tests/test_cli/test_add_pkg.py @@ -202,7 +202,7 @@ class TestAddPkg(unittest.TestCase): actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s add-pkg [options] tag package [package2 ...] + expected_stderr = """Usage: %s add-pkg [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: Please specify an owner for the package(s) @@ -239,7 +239,7 @@ class TestAddPkg(unittest.TestCase): actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s add-pkg [options] tag package [package2 ...] + expected_stderr = """Usage: %s add-pkg [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: Please specify a tag and at least one package diff --git a/tests/test_cli/test_add_tag.py b/tests/test_cli/test_add_tag.py index 72f4a964..c24c3e37 100644 --- a/tests/test_cli/test_add_tag.py +++ b/tests/test_cli/test_add_tag.py @@ -16,7 +16,7 @@ class TestAddTag(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s add-tag [options] name + self.error_format = """Usage: %s add-tag [options] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -80,7 +80,7 @@ class TestAddTag(utils.CliTestCase): def test_handle_add_tag_help(self): self.assert_help( handle_add_tag, - """Usage: %s add-tag [options] name + """Usage: %s add-tag [options] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_add_user.py b/tests/test_cli/test_add_user.py index 2b2f5918..388f60e1 100644 --- a/tests/test_cli/test_add_user.py +++ b/tests/test_cli/test_add_user.py @@ -16,7 +16,7 @@ class TestAddUser(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s add-user username [options] + self.error_format = """Usage: %s add-user [options] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -82,7 +82,7 @@ class TestAddUser(utils.CliTestCase): def test_handle_add_user_help(self): self.assert_help( handle_add_user, - """Usage: %s add-user username [options] + """Usage: %s add-user [options] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_add_volume.py b/tests/test_cli/test_add_volume.py index 08c81ce3..4a0b889f 100644 --- a/tests/test_cli/test_add_volume.py +++ b/tests/test_cli/test_add_volume.py @@ -16,7 +16,7 @@ class TestAddVolume(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s add-volume volume-name + self.error_format = """Usage: %s add-volume (Specify the --help global option for a list of other help options) %s: error: {message} @@ -66,7 +66,7 @@ class TestAddVolume(utils.CliTestCase): def test_handle_add_volume_help(self): self.assert_help( handle_add_volume, - """Usage: %s add-volume volume-name + """Usage: %s add-volume (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_block_group_pkg.py b/tests/test_cli/test_block_group_pkg.py index a57233cd..da56e13a 100644 --- a/tests/test_cli/test_block_group_pkg.py +++ b/tests/test_cli/test_block_group_pkg.py @@ -19,7 +19,7 @@ class TestBlockGroupPkg(utils.CliTestCase): self.options = mock.MagicMock() self.activate_session = mock.patch('koji_cli.commands.activate_session').start() - self.error_format = """Usage: %s block-group-pkg [options] [...] + self.error_format = """Usage: %s block-group-pkg [options] [ ...] Note that blocking is propagated through the inheritance chain, so it is not exactly the same as package removal. (Specify the --help global option for a list of other help options) @@ -55,7 +55,7 @@ Note that blocking is propagated through the inheritance chain, so it is not exa def test_handle_block_group_pkg_help(self): self.assert_help( handle_block_group_pkg, - """Usage: %s block-group-pkg [options] [...] + """Usage: %s block-group-pkg [options] [ ...] Note that blocking is propagated through the inheritance chain, so it is not exactly the same as package removal. (Specify the --help global option for a list of other help options) diff --git a/tests/test_cli/test_block_pkg.py b/tests/test_cli/test_block_pkg.py index 1af6ff98..a7bf3e0c 100644 --- a/tests/test_cli/test_block_pkg.py +++ b/tests/test_cli/test_block_pkg.py @@ -168,7 +168,7 @@ class TestBlockPkg(unittest.TestCase): actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s block-pkg [options] tag package [package2 ...] + expected_stderr = """Usage: %s block-pkg [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: Please specify a tag and at least one package diff --git a/tests/test_cli/test_build.py b/tests/test_cli/test_build.py index 86392f77..6384eedd 100644 --- a/tests/test_cli/test_build.py +++ b/tests/test_cli/test_build.py @@ -147,7 +147,7 @@ Task info: weburl/taskinfo?taskID=1 actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s build [options] target + expected_stderr = """Usage: %s build [options] (Specify the --help global option for a list of other help options) %s: error: Exactly two arguments (a build target and a SCM URL or srpm file) are required @@ -192,7 +192,7 @@ Task info: weburl/taskinfo?taskID=1 handle_build(self.options, self.session, args) actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() - expected_stdout = """Usage: %s build [options] target + expected_stdout = """Usage: %s build [options] (Specify the --help global option for a list of other help options) Options: @@ -255,7 +255,7 @@ Options: actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s build [options] target + expected_stderr = """Usage: %s build [options] (Specify the --help global option for a list of other help options) %s: error: --arch_override is only allowed for --scratch builds @@ -350,7 +350,7 @@ Task info: weburl/taskinfo?taskID=1 with self.assertRaises(SystemExit) as cm: handle_build(self.options, self.session, args) actual = stderr.getvalue() - expected = """Usage: %s build [options] target + expected = """Usage: %s build [options] (Specify the --help global option for a list of other help options) %s: error: Unknown build target: target @@ -401,7 +401,7 @@ Task info: weburl/taskinfo?taskID=1 with self.assertRaises(SystemExit) as cm: handle_build(self.options, self.session, args) actual = stderr.getvalue() - expected = """Usage: %s build [options] target + expected = """Usage: %s build [options] (Specify the --help global option for a list of other help options) %s: error: Unknown destination tag: dest_tag_name @@ -452,7 +452,7 @@ Task info: weburl/taskinfo?taskID=1 with self.assertRaises(SystemExit) as cm: handle_build(self.options, self.session, args) actual = stderr.getvalue() - expected = """Usage: %s build [options] target + expected = """Usage: %s build [options] (Specify the --help global option for a list of other help options) %s: error: Destination tag dest_tag_name is locked diff --git a/tests/test_cli/test_call.py b/tests/test_cli/test_call.py index c45901d2..8ffcf89c 100644 --- a/tests/test_cli/test_call.py +++ b/tests/test_cli/test_call.py @@ -17,7 +17,7 @@ class TestCall(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s call [options] name [arg...] + self.error_format = """Usage: %s call [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -136,7 +136,7 @@ class TestCall(utils.CliTestCase): """Test handle_call help message""" self.assert_help( handle_call, - """Usage: %s call [options] name [arg...] + """Usage: %s call [options] [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_chain_build.py b/tests/test_cli/test_chain_build.py index da7a62a5..b8ab16df 100644 --- a/tests/test_cli/test_chain_build.py +++ b/tests/test_cli/test_chain_build.py @@ -105,7 +105,7 @@ Task info: weburl/taskinfo?taskID=1 actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s chain-build [options] target URL [URL2 [:] URL3 [:] URL4 ...] + expected_stderr = """Usage: %s chain-build [options] [ [:] [:] ...] (Specify the --help global option for a list of other help options) %s: error: At least two arguments (a build target and a SCM URL) are required @@ -147,7 +147,7 @@ Task info: weburl/taskinfo?taskID=1 handle_chain_build(self.options, self.session, args) actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() - expected_stdout = """Usage: %s chain-build [options] target URL [URL2 [:] URL3 [:] URL4 ...] + expected_stdout = """Usage: %s chain-build [options] [ [:] [:] ...] (Specify the --help global option for a list of other help options) Options: @@ -206,7 +206,7 @@ Options: with self.assertRaises(SystemExit) as cm: handle_chain_build(self.options, self.session, args) actual = stderr.getvalue() - expected = """Usage: %s chain-build [options] target URL [URL2 [:] URL3 [:] URL4 ...] + expected = """Usage: %s chain-build [options] [ [:] [:] ...] (Specify the --help global option for a list of other help options) %s: error: Unknown build target: target @@ -268,7 +268,7 @@ Options: with self.assertRaises(SystemExit) as cm: handle_chain_build(self.options, self.session, args) actual = stderr.getvalue() - expected = """Usage: %s chain-build [options] target URL [URL2 [:] URL3 [:] URL4 ...] + expected = """Usage: %s chain-build [options] [ [:] [:] ...] (Specify the --help global option for a list of other help options) %s: error: Destination tag dest_tag is locked @@ -461,7 +461,7 @@ Target target is not usable for a chain-build with self.assertRaises(SystemExit) as cm: handle_chain_build(self.options, self.session, args) actual = stderr.getvalue() - expected = """Usage: %s chain-build [options] target URL [URL2 [:] URL3 [:] URL4 ...] + expected = """Usage: %s chain-build [options] [ [:] [:] ...] (Specify the --help global option for a list of other help options) %s: error: You must specify at least one dependency between builds with : (colon) diff --git a/tests/test_cli/test_disable_host.py b/tests/test_cli/test_disable_host.py index dbb23fff..5f44aba8 100644 --- a/tests/test_cli/test_disable_host.py +++ b/tests/test_cli/test_disable_host.py @@ -17,7 +17,7 @@ class TestDisableHost(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s disable-host [options] hostname ... + self.error_format = """Usage: %s disable-host [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -123,7 +123,7 @@ class TestDisableHost(utils.CliTestCase): """Test %s help message""" % handle_disable_host.__name__ self.assert_help( handle_disable_host, - """Usage: %s disable-host [options] hostname ... + """Usage: %s disable-host [options] [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_disable_user.py b/tests/test_cli/test_disable_user.py index e8598a4b..ef1f83c9 100644 --- a/tests/test_cli/test_disable_user.py +++ b/tests/test_cli/test_disable_user.py @@ -16,7 +16,7 @@ class TestDisableUser(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s disable-user username + self.error_format = """Usage: %s disable-user (Specify the --help global option for a list of other help options) %s: error: {message} @@ -63,7 +63,7 @@ class TestDisableUser(utils.CliTestCase): def test_handle_disable_user_help(self): self.assert_help( handle_disable_user, - """Usage: %s disable-user username + """Usage: %s disable-user (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_dist_repo.py b/tests/test_cli/test_dist_repo.py index 6d38fbdf..f6255290 100644 --- a/tests/test_cli/test_dist_repo.py +++ b/tests/test_cli/test_dist_repo.py @@ -44,8 +44,8 @@ class TestDistRepo(utils.CliTestCase): self.session.getTag.return_value = copy.deepcopy(self.TAG) self.session.distRepo.return_value = self.task_id - self.error_format = """Usage: %s dist-repo [options] tag keyID [keyID...] -(Specify the --help option for a list of other options) + self.error_format = """Usage: %s dist-repo [options] [ ...] +(Specify the --help global option for a list of other help options) %s: error: {message} """ % (self.progname, self.progname) @@ -248,8 +248,8 @@ class TestDistRepo(utils.CliTestCase): """Test handle_dist_repo help message""" self.assert_help( handle_dist_repo, - """Usage: %s dist-repo [options] tag keyID [keyID...] -(Specify the --help option for a list of other options) + """Usage: %s dist-repo [options] [ ...] +(Specify the --help global option for a list of other help options) Options: -h, --help show this help message and exit diff --git a/tests/test_cli/test_edit_host.py b/tests/test_cli/test_edit_host.py index 4b255d44..6b5641f4 100644 --- a/tests/test_cli/test_edit_host.py +++ b/tests/test_cli/test_edit_host.py @@ -162,7 +162,7 @@ class TestEditHost(unittest.TestCase): actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s edit-host hostname ... [options] + expected_stderr = """Usage: %s edit-host [ ...] [options] (Specify the --help global option for a list of other help options) %s: error: Please specify a hostname diff --git a/tests/test_cli/test_edit_tag.py b/tests/test_cli/test_edit_tag.py index 5244a636..b08404b0 100644 --- a/tests/test_cli/test_edit_tag.py +++ b/tests/test_cli/test_edit_tag.py @@ -111,7 +111,7 @@ class TestEditTag(unittest.TestCase): handle_edit_tag(options, session, args) actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() - expected_stdout = """Usage: %s edit-tag [options] name + expected_stdout = """Usage: %s edit-tag [options] (Specify the --help global option for a list of other help options) Options: @@ -162,7 +162,7 @@ Options: actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %(progname)s edit-tag [options] name + expected_stderr = """Usage: %(progname)s edit-tag [options] (Specify the --help global option for a list of other help options) %(progname)s: error: Please specify a name for the tag diff --git a/tests/test_cli/test_edit_user.py b/tests/test_cli/test_edit_user.py index 7f561166..12e43af3 100644 --- a/tests/test_cli/test_edit_user.py +++ b/tests/test_cli/test_edit_user.py @@ -70,7 +70,7 @@ class TestEditUser(unittest.TestCase): handle_edit_user(options, session, args) actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() - expected_stdout = """Usage: %s edit-user name [options] + expected_stdout = """Usage: %s edit-user [options] (Specify the --help global option for a list of other help options) Options: @@ -106,7 +106,7 @@ Options: actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %(progname)s edit-user name [options] + expected_stderr = """Usage: %(progname)s edit-user [options] (Specify the --help global option for a list of other help options) %(progname)s: error: You must specify the username of the user to edit diff --git a/tests/test_cli/test_enable_host.py b/tests/test_cli/test_enable_host.py index c274bee5..20fc5ee7 100644 --- a/tests/test_cli/test_enable_host.py +++ b/tests/test_cli/test_enable_host.py @@ -17,7 +17,7 @@ class TestEnableHost(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s enable-host [options] hostname ... + self.error_format = """Usage: %s enable-host [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -122,7 +122,7 @@ class TestEnableHost(utils.CliTestCase): """Test %s help message""" % handle_enable_host.__name__ self.assert_help( handle_enable_host, - """Usage: %s enable-host [options] hostname ... + """Usage: %s enable-host [options] [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_enable_user.py b/tests/test_cli/test_enable_user.py index 2861ce12..8145c97f 100644 --- a/tests/test_cli/test_enable_user.py +++ b/tests/test_cli/test_enable_user.py @@ -16,7 +16,7 @@ class TestEnableUser(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s enable-user username + self.error_format = """Usage: %s enable-user (Specify the --help global option for a list of other help options) %s: error: {message} @@ -63,7 +63,7 @@ class TestEnableUser(utils.CliTestCase): def test_handle_enable_user_help(self): self.assert_help( handle_enable_user, - """Usage: %s enable-user username + """Usage: %s enable-user (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_hello.py b/tests/test_cli/test_hello.py index a5638a13..e345c2a4 100644 --- a/tests/test_cli/test_hello.py +++ b/tests/test_cli/test_hello.py @@ -59,6 +59,7 @@ class TestHello(utils.CliTestCase): print_unicode_mock.return_value = "Hello" expect = """Usage: %s moshimoshi [options] +(Specify the --help global option for a list of other help options) %s: error: This command takes no arguments """ % (self.progname, self.progname) @@ -102,6 +103,7 @@ class TestHello(utils.CliTestCase): self.assert_help( handle_moshimoshi, """Usage: %s moshimoshi [options] +(Specify the --help global option for a list of other help options) Options: -h, --help show this help message and exit diff --git a/tests/test_cli/test_image_build.py b/tests/test_cli/test_image_build.py index f9211ca5..e1c3adb1 100644 --- a/tests/test_cli/test_image_build.py +++ b/tests/test_cli/test_image_build.py @@ -227,8 +227,8 @@ class TestImageBuild(utils.CliTestCase): self.session = mock.MagicMock() self.configparser = mock.patch('six.moves.configparser.ConfigParser').start() - self.error_format = """Usage: %s image-build [options] [...] - %s image-build --config FILE + self.error_format = """Usage: %s image-build [options] [ ...] + %s image-build --config (Specify the --help global option for a list of other help options) @@ -328,8 +328,8 @@ class TestImageBuild(utils.CliTestCase): """Test handle_image_build help message""" self.assert_help( handle_image_build, - """Usage: %s image-build [options] [...] - %s image-build --config FILE + """Usage: %s image-build [options] [ ...] + %s image-build --config (Specify the --help global option for a list of other help options) diff --git a/tests/test_cli/test_image_build_indirection.py b/tests/test_cli/test_image_build_indirection.py index 429b3b06..88dda02d 100644 --- a/tests/test_cli/test_image_build_indirection.py +++ b/tests/test_cli/test_image_build_indirection.py @@ -200,7 +200,7 @@ class TestImageBuildIndirection(utils.CliTestCase): self.session = mock.MagicMock() self.error_format = """Usage: %s image-build-indirection [base_image] [utility_image] [indirection_build_template] - %s image-build --config FILE + %s image-build --config (Specify the --help global option for a list of other help options) @@ -220,7 +220,7 @@ class TestImageBuildIndirection(utils.CliTestCase): self.assert_help( handle_image_build_indirection, """Usage: %s image-build-indirection [base_image] [utility_image] [indirection_build_template] - %s image-build --config FILE + %s image-build --config (Specify the --help global option for a list of other help options) diff --git a/tests/test_cli/test_import.py b/tests/test_cli/test_import.py index d1984179..623567f3 100644 --- a/tests/test_cli/test_import.py +++ b/tests/test_cli/test_import.py @@ -82,7 +82,7 @@ class TestImport(utils.CliTestCase): 'CANCELED': 4, } - self.error_format = """Usage: %s import [options] package [package...] + self.error_format = """Usage: %s import [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -681,7 +681,7 @@ class TestImport(utils.CliTestCase): """Test handle_import function help message""" self.assert_help( handle_import, - """Usage: %s import [options] package [package...] + """Usage: %s import [options] [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_import_cg.py b/tests/test_cli/test_import_cg.py index 72eae495..1875a51c 100644 --- a/tests/test_cli/test_import_cg.py +++ b/tests/test_cli/test_import_cg.py @@ -27,7 +27,7 @@ class TestImportCG(utils.CliTestCase): def setUp(self): self.custom_os_path_exists = {} self.os_path_exists = os.path.exists - self.error_format = """Usage: %s import-cg [options] metadata_file files_dir + self.error_format = """Usage: %s import-cg [options] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -209,7 +209,7 @@ class TestImportCG(utils.CliTestCase): """Test handle_import_cg help message""" self.assert_help( handle_import_cg, - """Usage: %s import-cg [options] metadata_file files_dir + """Usage: %s import-cg [options] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_import_sig.py b/tests/test_cli/test_import_sig.py index 2321a410..828ef9b2 100644 --- a/tests/test_cli/test_import_sig.py +++ b/tests/test_cli/test_import_sig.py @@ -1,5 +1,4 @@ from __future__ import absolute_import -import base64 import copy import hashlib import mock @@ -68,7 +67,7 @@ class TestImportSIG(utils.CliTestCase): } ] - self.error_format = """Usage: %s import-sig [options] package [package...] + self.error_format = """Usage: %s import-sig [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -274,7 +273,7 @@ class TestImportSIG(utils.CliTestCase): """Test handle_import_sig help message""" self.assert_help( handle_import_sig, - """Usage: %s import-sig [options] package [package...] + """Usage: %s import-sig [options] [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_list_groups.py b/tests/test_cli/test_list_groups.py index 1a5c85b2..57cc9f04 100644 --- a/tests/test_cli/test_list_groups.py +++ b/tests/test_cli/test_list_groups.py @@ -23,7 +23,7 @@ class TestListGroups(utils.CliTestCase): self.activate_session = mock.patch('koji_cli.commands.activate_session').start() self.event_from_opts = mock.patch('koji.util.eventFromOpts').start() - self.error_format = """Usage: %s list-groups [options] [group] + self.error_format = """Usage: %s list-groups [options] [] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -184,7 +184,7 @@ class TestListGroups(utils.CliTestCase): def test_anon_handle_list_groups_help(self): self.assert_help( anon_handle_list_groups, - """Usage: %s list-groups [options] [group] + """Usage: %s list-groups [options] [] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_list_tagged.py b/tests/test_cli/test_list_tagged.py index 2d37a2dc..a8f775dc 100644 --- a/tests/test_cli/test_list_tagged.py +++ b/tests/test_cli/test_list_tagged.py @@ -16,7 +16,7 @@ class TestCliListTagged(utils.CliTestCase): self.original_timezone = os.environ.get('TZ') os.environ['TZ'] = 'US/Eastern' time.tzset() - self.error_format = """Usage: %s list-tagged [options] tag [package] + self.error_format = """Usage: %s list-tagged [options] [] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -232,7 +232,7 @@ class TestCliListTagged(utils.CliTestCase): def test_handle_list_tagged_help(self): self.assert_help( anon_handle_list_tagged, - """Usage: %s list-tagged [options] tag [package] + """Usage: %s list-tagged [options] [] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_maven_build.py b/tests/test_cli/test_maven_build.py index a3d5bf94..fac3cb50 100644 --- a/tests/test_cli/test_maven_build.py +++ b/tests/test_cli/test_maven_build.py @@ -108,8 +108,8 @@ Task info: weburl/taskinfo?taskID=1 actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s maven-build [options] target URL - %s maven-build --ini=CONFIG... [options] target + expected_stderr = """Usage: %s maven-build [options] + %s maven-build --ini=CONFIG... [options] (Specify the --help global option for a list of other help options) %s: error: Exactly two arguments (a build target and a SCM URL) are required @@ -151,8 +151,8 @@ Task info: weburl/taskinfo?taskID=1 actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s maven-build [options] target URL - %s maven-build --ini=CONFIG... [options] target + expected_stderr = """Usage: %s maven-build [options] + %s maven-build --ini=CONFIG... [options] (Specify the --help global option for a list of other help options) %s: error: Exactly one argument (a build target) is required @@ -193,8 +193,8 @@ Task info: weburl/taskinfo?taskID=1 handle_maven_build(self.options, self.session, args) actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() - expected_stdout = """Usage: %s maven-build [options] target URL - %s maven-build --ini=CONFIG... [options] target + expected_stdout = """Usage: %s maven-build [options] + %s maven-build --ini=CONFIG... [options] (Specify the --help global option for a list of other help options) Options: @@ -268,8 +268,8 @@ Options: with self.assertRaises(SystemExit) as cm: handle_maven_build(self.options, self.session, args) actual = stderr.getvalue() - expected = """Usage: %s maven-build [options] target URL - %s maven-build --ini=CONFIG... [options] target + expected = """Usage: %s maven-build [options] + %s maven-build --ini=CONFIG... [options] (Specify the --help global option for a list of other help options) %s: error: Unknown build target: target @@ -316,8 +316,8 @@ Options: with self.assertRaises(SystemExit) as cm: handle_maven_build(self.options, self.session, args) actual = stderr.getvalue() - expected = """Usage: %s maven-build [options] target URL - %s maven-build --ini=CONFIG... [options] target + expected = """Usage: %s maven-build [options] + %s maven-build --ini=CONFIG... [options] (Specify the --help global option for a list of other help options) %s: error: Unknown destination tag: dest_tag @@ -364,8 +364,8 @@ Options: with self.assertRaises(SystemExit) as cm: handle_maven_build(self.options, self.session, args) actual = stderr.getvalue() - expected = """Usage: %s maven-build [options] target URL - %s maven-build --ini=CONFIG... [options] target + expected = """Usage: %s maven-build [options] + %s maven-build --ini=CONFIG... [options] (Specify the --help global option for a list of other help options) %s: error: Destination tag dest_tag is locked @@ -476,8 +476,8 @@ Task info: weburl/taskinfo?taskID=1 with self.assertRaises(SystemExit) as cm: handle_maven_build(self.options, self.session, args) actual = stderr.getvalue() - expected = """Usage: %s maven-build [options] target URL - %s maven-build --ini=CONFIG... [options] target + expected = """Usage: %s maven-build [options] + %s maven-build --ini=CONFIG... [options] (Specify the --help global option for a list of other help options) %s: error: Section section does not contain a maven-build config @@ -507,8 +507,8 @@ Task info: weburl/taskinfo?taskID=1 with self.assertRaises(SystemExit) as cm: handle_maven_build(self.options, self.session, args) actual = stderr.getvalue() - expected = """Usage: %s maven-build [options] target URL - %s maven-build --ini=CONFIG... [options] target + expected = """Usage: %s maven-build [options] + %s maven-build --ini=CONFIG... [options] (Specify the --help global option for a list of other help options) %s: error: errormsg @@ -557,8 +557,8 @@ Task info: weburl/taskinfo?taskID=1 with self.assertRaises(SystemExit) as cm: handle_maven_build(self.options, self.session, args) actual = stderr.getvalue() - expected = """Usage: %s maven-build [options] target URL - %s maven-build --ini=CONFIG... [options] target + expected = """Usage: %s maven-build [options] + %s maven-build --ini=CONFIG... [options] (Specify the --help global option for a list of other help options) %s: error: Invalid SCM URL: badscm diff --git a/tests/test_cli/test_maven_chain.py b/tests/test_cli/test_maven_chain.py index bb4380cf..91429e2d 100644 --- a/tests/test_cli/test_maven_chain.py +++ b/tests/test_cli/test_maven_chain.py @@ -20,7 +20,7 @@ class TestMavenChain(utils.CliTestCase): self.config = 'config' self.task_id = 101 - self.error_format = """Usage: %s maven-chain [options] target config... + self.error_format = """Usage: %s maven-chain [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -175,7 +175,7 @@ class TestMavenChain(utils.CliTestCase): """Test handle_maven_chain help message full output""" self.assert_help( handle_maven_chain, - """Usage: %s maven-chain [options] target config... + """Usage: %s maven-chain [options] [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_move_build.py b/tests/test_cli/test_move_build.py index da184be7..19b5fedc 100644 --- a/tests/test_cli/test_move_build.py +++ b/tests/test_cli/test_move_build.py @@ -19,7 +19,7 @@ class TestMoveBuild(utils.CliTestCase): self.session = mock.MagicMock() self.options = mock.MagicMock() - self.error_format = """Usage: %s move-build [options] [...] + self.error_format = """Usage: %s move-build [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -147,7 +147,7 @@ class TestMoveBuild(utils.CliTestCase): """Test handle_move_build help message""" self.assert_help( handle_move_build, - """Usage: %s move-build [options] [...] + """Usage: %s move-build [options] [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_remove_channel.py b/tests/test_cli/test_remove_channel.py index c1381ac5..61fe9d56 100644 --- a/tests/test_cli/test_remove_channel.py +++ b/tests/test_cli/test_remove_channel.py @@ -111,7 +111,7 @@ class TestRemoveChannel(unittest.TestCase): actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s remove-channel [options] channel + expected_stderr = """Usage: %s remove-channel [options] (Specify the --help global option for a list of other help options) %s: error: Incorrect number of arguments diff --git a/tests/test_cli/test_remove_host_from_channel.py b/tests/test_cli/test_remove_host_from_channel.py index dc5ae0d1..35c9cbad 100644 --- a/tests/test_cli/test_remove_host_from_channel.py +++ b/tests/test_cli/test_remove_host_from_channel.py @@ -124,7 +124,7 @@ class TestRemoveHostFromChannel(unittest.TestCase): actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s remove-host-from-channel [options] hostname channel + expected_stderr = """Usage: %s remove-host-from-channel [options] (Specify the --help global option for a list of other help options) %s: error: Please specify a hostname and a channel diff --git a/tests/test_cli/test_remove_pkg.py b/tests/test_cli/test_remove_pkg.py index 455f3c0c..bf8e3665 100644 --- a/tests/test_cli/test_remove_pkg.py +++ b/tests/test_cli/test_remove_pkg.py @@ -209,7 +209,7 @@ class TestRemovePkg(unittest.TestCase): actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s remove-pkg [options] tag package [package2 ...] + expected_stderr = """Usage: %s remove-pkg [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: Please specify a tag and at least one package diff --git a/tests/test_cli/test_rename_channel.py b/tests/test_cli/test_rename_channel.py index 404a4efc..9d0835b2 100644 --- a/tests/test_cli/test_rename_channel.py +++ b/tests/test_cli/test_rename_channel.py @@ -87,7 +87,7 @@ class TestRenameChannel(unittest.TestCase): actual_stdout = stdout.getvalue() actual_stderr = stderr.getvalue() expected_stdout = '' - expected_stderr = """Usage: %s rename-channel [options] old-name new-name + expected_stderr = """Usage: %s rename-channel [options] (Specify the --help global option for a list of other help options) %s: error: Incorrect number of arguments diff --git a/tests/test_cli/test_resubmit.py b/tests/test_cli/test_resubmit.py index f062dd6b..4dfae372 100644 --- a/tests/test_cli/test_resubmit.py +++ b/tests/test_cli/test_resubmit.py @@ -31,7 +31,7 @@ Log Files: /mnt/koji/work/tasks/2/2/mergerepos.log """ - self.error_format = """Usage: %s resubmit [options] taskID + self.error_format = """Usage: %s resubmit [options] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -123,7 +123,7 @@ Log Files: """Test handle_resubmit help message output""" self.assert_help( handle_resubmit, - """Usage: %s resubmit [options] taskID + """Usage: %s resubmit [options] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_search.py b/tests/test_cli/test_search.py index 344c9239..1d4c6c3d 100644 --- a/tests/test_cli/test_search.py +++ b/tests/test_cli/test_search.py @@ -16,7 +16,7 @@ class TestSearch(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s search [options] search_type pattern + self.error_format = """Usage: %s search [options] Available search types: package, build, tag, target, user, host, rpm, maven, win (Specify the --help global option for a list of other help options) @@ -80,7 +80,7 @@ Available search types: package, build, tag, target, user, host, rpm, maven, win def test_anon_handle_search_help(self): self.assert_help( anon_handle_search, - """Usage: %s search [options] search_type pattern + """Usage: %s search [options] Available search types: package, build, tag, target, user, host, rpm, maven, win (Specify the --help global option for a list of other help options) diff --git a/tests/test_cli/test_set_build_volume.py b/tests/test_cli/test_set_build_volume.py index 23596f02..85c18502 100644 --- a/tests/test_cli/test_set_build_volume.py +++ b/tests/test_cli/test_set_build_volume.py @@ -16,7 +16,7 @@ class TestSetBuildVolume(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s set-build-volume volume n-v-r [n-v-r ...] + self.error_format = """Usage: %s set-build-volume [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -104,7 +104,7 @@ class TestSetBuildVolume(utils.CliTestCase): def test_handle_set_build_volume_help(self): self.assert_help( handle_set_build_volume, - """Usage: %s set-build-volume volume n-v-r [n-v-r ...] + """Usage: %s set-build-volume [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_set_pkg_arches.py b/tests/test_cli/test_set_pkg_arches.py index 0211e441..6501e79c 100644 --- a/tests/test_cli/test_set_pkg_arches.py +++ b/tests/test_cli/test_set_pkg_arches.py @@ -16,7 +16,7 @@ class TestSetPkgArches(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s set-pkg-arches [options] arches tag package [package2 ...] + self.error_format = """Usage: %s set-pkg-arches [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -59,7 +59,7 @@ class TestSetPkgArches(utils.CliTestCase): def test_handle_set_pkg_arches_help(self): self.assert_help( handle_set_pkg_arches, - """Usage: %s set-pkg-arches [options] arches tag package [package2 ...] + """Usage: %s set-pkg-arches [options] [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_set_pkg_owner.py b/tests/test_cli/test_set_pkg_owner.py index 968f6038..18e57af9 100644 --- a/tests/test_cli/test_set_pkg_owner.py +++ b/tests/test_cli/test_set_pkg_owner.py @@ -16,7 +16,7 @@ class TestSetPkgOwner(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s set-pkg-owner [options] owner tag package [package2 ...] + self.error_format = """Usage: %s set-pkg-owner [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -59,7 +59,7 @@ class TestSetPkgOwner(utils.CliTestCase): def test_handle_set_pkg_owner_help(self): self.assert_help( handle_set_pkg_owner, - """Usage: %s set-pkg-owner [options] owner tag package [package2 ...] + """Usage: %s set-pkg-owner [options] [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_set_task_priority.py b/tests/test_cli/test_set_task_priority.py index 61a3144a..1455fc0e 100644 --- a/tests/test_cli/test_set_task_priority.py +++ b/tests/test_cli/test_set_task_priority.py @@ -16,7 +16,7 @@ class TestSetTaskPriority(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s set-task-priority [options] --priority= [task-id]... + self.error_format = """Usage: %s set-task-priority [options] --priority= [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -82,7 +82,7 @@ class TestSetTaskPriority(utils.CliTestCase): def test_handle_set_task_priority_help(self): self.assert_help( handle_set_task_priority, - """Usage: %s set-task-priority [options] --priority= [task-id]... + """Usage: %s set-task-priority [options] --priority= [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_tag_build.py b/tests/test_cli/test_tag_build.py index ed877763..e82e0070 100644 --- a/tests/test_cli/test_tag_build.py +++ b/tests/test_cli/test_tag_build.py @@ -19,7 +19,7 @@ class TestTagBuild(utils.CliTestCase): self.session = mock.MagicMock() self.options = mock.MagicMock() - self.error_format = """Usage: %s tag-build [options] [...] + self.error_format = """Usage: %s tag-build [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -89,7 +89,7 @@ class TestTagBuild(utils.CliTestCase): def test_handle_tag_build_help(self): self.assert_help( handle_tag_build, - """Usage: %s tag-build [options] [...] + """Usage: %s tag-build [options] [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_taskinfo.py b/tests/test_cli/test_taskinfo.py index 5c342be2..d16a2208 100644 --- a/tests/test_cli/test_taskinfo.py +++ b/tests/test_cli/test_taskinfo.py @@ -588,7 +588,7 @@ class TestTaskInfo(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s taskinfo [options] taskID [taskID...] + self.error_format = """Usage: %s taskinfo [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -638,7 +638,7 @@ Host: kojibuilder def test_anon_handle_taskinfo_help(self): self.assert_help( anon_handle_taskinfo, - """Usage: %s taskinfo [options] taskID [taskID...] + """Usage: %s taskinfo [options] [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_unblock_group_pkg.py b/tests/test_cli/test_unblock_group_pkg.py index 8cdfe318..d82deb17 100644 --- a/tests/test_cli/test_unblock_group_pkg.py +++ b/tests/test_cli/test_unblock_group_pkg.py @@ -19,7 +19,7 @@ class TestBlockGroupPkg(utils.CliTestCase): self.options = mock.MagicMock() self.activate_session = mock.patch('koji_cli.commands.activate_session').start() - self.error_format = """Usage: %s unblock-group-pkg [options] [...] + self.error_format = """Usage: %s unblock-group-pkg [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -54,7 +54,7 @@ class TestBlockGroupPkg(utils.CliTestCase): def test_handle_unblock_group_pkg_help(self): self.assert_help( handle_unblock_group_pkg, - """Usage: %s unblock-group-pkg [options] [...] + """Usage: %s unblock-group-pkg [options] [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_unblock_pkg.py b/tests/test_cli/test_unblock_pkg.py index 2b6555cf..1d1923bc 100644 --- a/tests/test_cli/test_unblock_pkg.py +++ b/tests/test_cli/test_unblock_pkg.py @@ -17,7 +17,7 @@ class TestUnblockPkg(utils.CliTestCase): maxDiff = None def setUp(self): - self.error_format = """Usage: %s unblock-pkg [options] tag package [package2 ...] + self.error_format = """Usage: %s unblock-pkg [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -60,7 +60,7 @@ class TestUnblockPkg(utils.CliTestCase): def test_handle_unblock_pkg_help(self): self.assert_help( handle_unblock_pkg, - """Usage: %s unblock-pkg [options] tag package [package2 ...] + """Usage: %s unblock-pkg [options] [ ...] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_wrapper_rpm.py b/tests/test_cli/test_wrapper_rpm.py index f4f83ce4..ee69f047 100644 --- a/tests/test_cli/test_wrapper_rpm.py +++ b/tests/test_cli/test_wrapper_rpm.py @@ -21,7 +21,7 @@ class TestWrapperRpm(utils.CliTestCase): self.scm_url = 'git+https://github.com/project/test#12345' self.task_id = 1 - self.error_format = """Usage: %s wrapper-rpm [options] target build-id|n-v-r URL + self.error_format = """Usage: %s wrapper-rpm [options] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -223,7 +223,7 @@ class TestWrapperRpm(utils.CliTestCase): """Test handle_wrapper_rpm help message output""" self.assert_help( handle_wrapper_rpm, - """Usage: %s wrapper-rpm [options] target build-id|n-v-r URL + """Usage: %s wrapper-rpm [options] (Specify the --help global option for a list of other help options) Options: diff --git a/tests/test_cli/test_write_signed_rpm.py b/tests/test_cli/test_write_signed_rpm.py index ad258daf..1c6a07f8 100644 --- a/tests/test_cli/test_write_signed_rpm.py +++ b/tests/test_cli/test_write_signed_rpm.py @@ -107,7 +107,7 @@ class TestWriteSignedRPM(utils.CliTestCase): def setUp(self): self.custom_os_path_exists = {} self.os_path_exists = os.path.exists - self.error_format = """Usage: %s write-signed-rpm [options] n-v-r [n-v-r...] + self.error_format = """Usage: %s write-signed-rpm [options] [ ...] (Specify the --help global option for a list of other help options) %s: error: {message} @@ -238,7 +238,7 @@ class TestWriteSignedRPM(utils.CliTestCase): """Test handle_write_signed_rpm help message""" self.assert_help( handle_write_signed_rpm, - """Usage: %s write-signed-rpm [options] n-v-r [n-v-r...] + """Usage: %s write-signed-rpm [options] [ ...] (Specify the --help global option for a list of other help options) Options: