mirror of
https://github.com/certbot/certbot.git
synced 2026-06-14 19:20:09 -04:00
manual_test: mock yesno interaction
This commit is contained in:
parent
4adc6d3269
commit
aa0c7d9932
1 changed files with 3 additions and 1 deletions
|
|
@ -43,11 +43,13 @@ class AuthenticatorTest(unittest.TestCase):
|
|||
def test_perform_empty(self):
|
||||
self.assertEqual([], self.auth.perform([]))
|
||||
|
||||
@mock.patch("letsencrypt.proof_of_possession.zope.component.getUtility")
|
||||
@mock.patch("letsencrypt.plugins.manual.sys.stdout")
|
||||
@mock.patch("acme.challenges.SimpleHTTPResponse.simple_verify")
|
||||
@mock.patch("__builtin__.raw_input")
|
||||
def test_perform(self, mock_raw_input, mock_verify, mock_stdout):
|
||||
def test_perform(self, mock_raw_input, mock_verify, mock_stdout, mock_input, mock_interaction):
|
||||
mock_verify.return_value = True
|
||||
mock_interaction.yesno.return_value = True
|
||||
|
||||
resp = challenges.SimpleHTTPResponse(tls=False)
|
||||
self.assertEqual([resp], self.auth.perform(self.achalls))
|
||||
|
|
|
|||
Loading…
Reference in a new issue