mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 08:12:15 -04:00
Add option_was_set test
This commit is contained in:
parent
97af8dfb70
commit
f9d5ecaf6f
1 changed files with 13 additions and 0 deletions
|
|
@ -447,6 +447,19 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
|
|||
short_args += '--server example.com'.split()
|
||||
self._check_server_conflict_message(short_args, '--staging')
|
||||
|
||||
def test_option_was_set(self):
|
||||
key_size_option = 'rsa_key_size'
|
||||
key_size_value = cli.flag_default(key_size_option)
|
||||
self._get_argument_parser()(
|
||||
'--rsa-key-size {0}'.format(key_size_value).split())
|
||||
|
||||
self.assertTrue(cli.option_was_set(key_size_option, key_size_value))
|
||||
self.assertTrue(cli.option_was_set('no_verify_ssl', True))
|
||||
|
||||
config_dir_option = 'config_dir'
|
||||
self.assertFalse(cli.option_was_set(
|
||||
config_dir_option, cli.flag_default(config_dir_option)))
|
||||
|
||||
def _assert_dry_run_flag_worked(self, namespace, existing_account):
|
||||
self.assertTrue(namespace.dry_run)
|
||||
self.assertTrue(namespace.break_my_certs)
|
||||
|
|
|
|||
Loading…
Reference in a new issue