fix usage message for add-pkg

Fixes: https://pagure.io/koji/issue/1212
This commit is contained in:
Tomas Kopecek 2020-01-16 13:53:13 +01:00
parent c3a12ba78a
commit 4e28eda265
2 changed files with 3 additions and 3 deletions

View file

@ -320,7 +320,7 @@ def handle_rename_channel(goptions, session, args):
def handle_add_pkg(goptions, session, args):
"[admin] Add a package to the listing for tag"
usage = _("usage: %prog add-pkg [options] <tag> <package> [<package> ...]")
usage = _("usage: %prog add-pkg [options] --owner <owner> <tag> <package> [<package> ...]")
parser = OptionParser(usage=get_usage_str(usage))
parser.add_option("--force", action='store_true', help=_("Override blocks if necessary"))
parser.add_option("--owner", help=_("Specify owner"))

View file

@ -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> [<package> ...]
expected_stderr = """Usage: %s add-pkg [options] --owner <owner> <tag> <package> [<package> ...]
(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> [<package> ...]
expected_stderr = """Usage: %s add-pkg [options] --owner <owner> <tag> <package> [<package> ...]
(Specify the --help global option for a list of other help options)
%s: error: Please specify a tag and at least one package