mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 16:22:18 -04:00
Standalone Authenticator: no fail when port taken (fixes #381)
This commit is contained in:
parent
34ed54079d
commit
4646d8d6bf
2 changed files with 2 additions and 1 deletions
|
|
@ -152,7 +152,6 @@ class StandaloneAuthenticator(common.Plugin):
|
|||
:rtype: bool
|
||||
|
||||
"""
|
||||
|
||||
display = zope.component.getUtility(interfaces.IDisplay)
|
||||
|
||||
start_time = time.time()
|
||||
|
|
|
|||
|
|
@ -317,6 +317,7 @@ class PerformTest(unittest.TestCase):
|
|||
"""What happens if start_listener() returns True."""
|
||||
self.authenticator.start_listener = mock.Mock()
|
||||
self.authenticator.start_listener.return_value = True
|
||||
self.authenticator.already_listening = mock.Mock(return_value=False)
|
||||
result = self.authenticator.perform(self.achalls)
|
||||
self.assertEqual(len(self.authenticator.tasks), 2)
|
||||
self.assertTrue(
|
||||
|
|
@ -335,6 +336,7 @@ class PerformTest(unittest.TestCase):
|
|||
"""What happens if start_listener() returns False."""
|
||||
self.authenticator.start_listener = mock.Mock()
|
||||
self.authenticator.start_listener.return_value = False
|
||||
self.authenticator.already_listening = mock.Mock(return_value=False)
|
||||
result = self.authenticator.perform(self.achalls)
|
||||
self.assertEqual(len(self.authenticator.tasks), 2)
|
||||
self.assertTrue(
|
||||
|
|
|
|||
Loading…
Reference in a new issue