From 1fd44d9302b5fa374dfc0c87416eb6006bccc8d2 Mon Sep 17 00:00:00 2001 From: Amjad Mashaal Date: Wed, 25 May 2016 03:55:52 +0200 Subject: [PATCH] Fixing tests --- certbot/cli.py | 3 +++ certbot/tests/cli_test.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/certbot/cli.py b/certbot/cli.py index f96bf2656..e2878c1e9 100644 --- a/certbot/cli.py +++ b/certbot/cli.py @@ -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 diff --git a/certbot/tests/cli_test.py b/certbot/tests/cli_test.py index 64cf98c2c..7e352febb 100644 --- a/certbot/tests/cli_test.py +++ b/certbot/tests/cli_test.py @@ -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)