Fixing tests

This commit is contained in:
Amjad Mashaal 2016-05-25 03:55:52 +02:00
parent 8772a9846f
commit 1fd44d9302
2 changed files with 6 additions and 1 deletions

View file

@ -552,6 +552,9 @@ def prepare_and_parse_args(plugins, args, detect_defaults=False):
:rtype: argparse.Namespace
"""
# pylint: disable=too-many-statements
helpful = HelpfulArgumentParser(args, plugins, detect_defaults)
# --help is automatically provided by argparse

View file

@ -49,7 +49,7 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
self.logs_dir = os.path.join(self.tmp_dir, 'logs')
self.standard_args = ['--config-dir', self.config_dir,
'--work-dir', self.work_dir,
'--logs-dir', self.logs_dir]
'--logs-dir', self.logs_dir, '--text']
def tearDown(self):
shutil.rmtree(self.tmp_dir)
@ -152,6 +152,8 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
@mock.patch('certbot.main.renew')
def test_gui(self, renew):
args = ['renew', '--dialog']
# --text conflicts with --dialog
self.standard_args.remove('--text')
self._call(args)
self.assertFalse(renew.call_args[0][0].noninteractive_mode)