fix test mock after moving getUtility call

This commit is contained in:
Brad Warren 2016-08-29 16:30:17 -07:00
parent b854d10795
commit 55e86983e7

View file

@ -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")