standalone: add an auth_hint

This commit is contained in:
Alex Zorin
2021-06-22 09:24:44 +10:00
parent bc7c953bcc
commit e5c41e76c5
2 changed files with 16 additions and 0 deletions
+7
View File
@@ -177,6 +177,13 @@ class AuthenticatorTest(unittest.TestCase):
"server1": set(), "server2": set()})
self.auth.servers.stop.assert_called_with(2)
def test_auth_hint(self):
self.config.http01_port = "80"
self.config.http01_address = None
self.assertIn("on port 80", self.auth.auth_hint([]))
self.config.http01_address = "127.0.0.1"
self.assertIn("on 127.0.0.1:80", self.auth.auth_hint([]))
if __name__ == "__main__":
unittest.main() # pragma: no cover