Merge pull request #3064 from TheNavigat/v-text

-v implies --text
This commit is contained in:
Brad Warren 2016-07-15 16:40:57 -07:00 committed by GitHub
commit bfca273657
2 changed files with 8 additions and 0 deletions

View file

@ -393,6 +393,8 @@ class HelpfulArgumentParser(object):
("Conflicting values for displayer."
" {0} conflicts with dialog_mode").format(arg)
)
elif parsed_args.verbose_count > flag_default("verbose_count"):
parsed_args.text_mode = True
if parsed_args.validate_hooks:
hooks.validate_hooks(parsed_args)

View file

@ -1020,6 +1020,12 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
args = ['renew', '--dialog', '--text']
self.assertRaises(errors.Error, self._call, args)
def test_text_mode_when_verbose(self):
parse = self._get_argument_parser()
short_args = ['-v']
namespace = parse(short_args)
self.assertTrue(namespace.text_mode)
class DetermineAccountTest(unittest.TestCase):
"""Tests for certbot.cli._determine_account."""