mirror of
https://github.com/certbot/certbot.git
synced 2026-08-04 08:03:44 +02:00
Fix pep8 warnings (down to only one now!)
This commit is contained in:
+4
-1
@@ -729,11 +729,13 @@ def create_parser(plugins, args):
|
|||||||
|
|
||||||
return helpful.parser, helpful.args
|
return helpful.parser, helpful.args
|
||||||
|
|
||||||
|
|
||||||
# For now unfortunately this constant just needs to match the code below;
|
# For now unfortunately this constant just needs to match the code below;
|
||||||
# there isn't an elegant way to autogenerate it in time.
|
# there isn't an elegant way to autogenerate it in time.
|
||||||
VERBS = ["run", "auth", "install", "revoke", "rollback", "config_changes", "plugins"]
|
VERBS = ["run", "auth", "install", "revoke", "rollback", "config_changes", "plugins"]
|
||||||
HELP_TOPICS = ["all", "security", "paths", "automation", "testing"] + VERBS
|
HELP_TOPICS = ["all", "security", "paths", "automation", "testing"] + VERBS
|
||||||
|
|
||||||
|
|
||||||
def _create_subparsers(helpful):
|
def _create_subparsers(helpful):
|
||||||
subparsers = helpful.parser.add_subparsers(metavar="SUBCOMMAND")
|
subparsers = helpful.parser.add_subparsers(metavar="SUBCOMMAND")
|
||||||
|
|
||||||
@@ -762,7 +764,8 @@ def _create_subparsers(helpful):
|
|||||||
helpful.add_group("plugins", description="Plugin options")
|
helpful.add_group("plugins", description="Plugin options")
|
||||||
|
|
||||||
helpful.add("auth",
|
helpful.add("auth",
|
||||||
"--csr", type=read_file, help="Path to a Certificate Signing Request (CSR) in DER format.")
|
"--csr", type=read_file,
|
||||||
|
help="Path to a Certificate Signing Request (CSR) in DER format.")
|
||||||
helpful.add("rollback",
|
helpful.add("rollback",
|
||||||
"--checkpoints", type=int, metavar="N",
|
"--checkpoints", type=int, metavar="N",
|
||||||
default=flag_default("rollback_checkpoints"),
|
default=flag_default("rollback_checkpoints"),
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ class CLITest(unittest.TestCase):
|
|||||||
ret = cli.main(args)
|
ret = cli.main(args)
|
||||||
return ret, None, stderr, client
|
return ret, None, stderr, client
|
||||||
|
|
||||||
|
|
||||||
def test_no_flags(self):
|
def test_no_flags(self):
|
||||||
with mock.patch('letsencrypt.cli.run') as mock_run:
|
with mock.patch('letsencrypt.cli.run') as mock_run:
|
||||||
self._call([])
|
self._call([])
|
||||||
@@ -91,7 +90,6 @@ class CLITest(unittest.TestCase):
|
|||||||
from letsencrypt import cli
|
from letsencrypt import cli
|
||||||
self.assertTrue(cli.USAGE in out)
|
self.assertTrue(cli.USAGE in out)
|
||||||
|
|
||||||
|
|
||||||
def test_rollback(self):
|
def test_rollback(self):
|
||||||
_, _, _, client = self._call(['rollback'])
|
_, _, _, client = self._call(['rollback'])
|
||||||
self.assertEqual(1, client.rollback.call_count)
|
self.assertEqual(1, client.rollback.call_count)
|
||||||
|
|||||||
Reference in New Issue
Block a user