From e039920a99a55cd72113d376805b0ecaab945c45 Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Tue, 16 Oct 2018 06:13:13 -0700 Subject: [PATCH] Move mocked sleep elsewhere --- certbot/tests/main_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/certbot/tests/main_test.py b/certbot/tests/main_test.py index 91903ef67..1c26d971a 100644 --- a/certbot/tests/main_test.py +++ b/certbot/tests/main_test.py @@ -68,8 +68,7 @@ class RunTest(test_util.ConfigTestCase): mock.patch('certbot.main._init_le_client'), mock.patch('certbot.main._suggest_donation_if_appropriate'), mock.patch('certbot.main._report_new_cert'), - mock.patch('certbot.main._find_cert'), - mock.patch('certbot.time.sleep')] + mock.patch('certbot.main._find_cert')] self.mock_auth = self.patches[0].start() self.mock_success_installation = self.patches[1].start() @@ -78,7 +77,6 @@ class RunTest(test_util.ConfigTestCase): self.mock_suggest_donation = self.patches[4].start() self.mock_report_cert = self.patches[5].start() self.mock_find_cert = self.patches[6].start() - self.mock_sleep = self.patches[7].start() def tearDown(self): for patch in self.patches: @@ -519,6 +517,8 @@ class MainTest(test_util.ConfigTestCase): # pylint: disable=too-many-public-met '--work-dir', self.config.work_dir, '--logs-dir', self.config.logs_dir, '--text'] + self.mock_sleep = mock.patch('certbot.time.sleep').start() + def tearDown(self): # Reset globals in cli reload_module(cli)