mirror of
https://github.com/certbot/certbot.git
synced 2026-06-09 00:32:12 -04:00
Use cli.py to set .staple given .must_staple
This commit is contained in:
parent
efcd0090da
commit
b77d288adb
2 changed files with 10 additions and 0 deletions
|
|
@ -343,6 +343,9 @@ class HelpfulArgumentParser(object):
|
|||
if parsed_args.csr:
|
||||
self.handle_csr(parsed_args)
|
||||
|
||||
if parsed_args.must_staple:
|
||||
parsed_args.staple = True
|
||||
|
||||
hooks.validate_hooks(parsed_args)
|
||||
|
||||
return parsed_args
|
||||
|
|
|
|||
|
|
@ -422,6 +422,13 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
|
|||
for arg in conflicting_args:
|
||||
self.assertTrue(arg in error.message)
|
||||
|
||||
def test_must_staple_flag(self):
|
||||
parse = self._get_argument_parser()
|
||||
short_args = ['--must-staple']
|
||||
namespace = parse(short_args)
|
||||
self.assertTrue(namespace.must_staple)
|
||||
self.assertTrue(namespace.staple)
|
||||
|
||||
def test_staging_flag(self):
|
||||
parse = self._get_argument_parser()
|
||||
short_args = ['--staging']
|
||||
|
|
|
|||
Loading…
Reference in a new issue