From 55e86983e793e8510b013809cfdb8dd257111928 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Mon, 29 Aug 2016 16:30:17 -0700 Subject: [PATCH] fix test mock after moving getUtility call --- certbot/plugins/manual_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/certbot/plugins/manual_test.py b/certbot/plugins/manual_test.py index 2fb679a36..7626f607d 100644 --- a/certbot/plugins/manual_test.py +++ b/certbot/plugins/manual_test.py @@ -52,7 +52,9 @@ class AuthenticatorTest(unittest.TestCase): self.assertTrue(all(issubclass(pref, challenges.Challenge) for pref in self.auth.get_chall_pref("foo.com"))) - def test_perform_empty(self): + @mock.patch("certbot.plugins.manual.zope.component.getUtility") + def test_perform_empty(self, mock_interaction): + mock_interaction().yesno.return_value = True self.assertEqual([], self.auth.perform([])) @mock.patch("certbot.plugins.manual.zope.component.getUtility")