mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:45:22 +02:00
Add ServerManagerTest stub.
This commit is contained in:
@@ -49,7 +49,7 @@ class ServerManager(object):
|
||||
cls = BaseHTTPServer.HTTPServer
|
||||
|
||||
try:
|
||||
server = cls(('', port), handler)
|
||||
server = cls(("", port), handler)
|
||||
except socket.error as error:
|
||||
errors.StandaloneBindError(error, port)
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
"""Tests for letsencrypt.plugins.standalone."""
|
||||
import unittest
|
||||
|
||||
|
||||
class ServerManagerTest(unittest.TestCase):
|
||||
"""Tests for letsencrypt.plugins.standalone.ServerManager."""
|
||||
|
||||
def setUp(self):
|
||||
from letsencrypt.plugins.standalone import ServerManager
|
||||
self.certs = {}
|
||||
self.simple_http_resources = {}
|
||||
self.mgr = ServerManager(self.certs, self.simple_http_resources)
|
||||
|
||||
def test_init(self):
|
||||
self.assertTrue(self.mgr.certs is self.certs)
|
||||
self.assertTrue(
|
||||
self.mgr.simple_http_resources is self.simple_http_resources)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main() # pragma: no cover
|
||||
Reference in New Issue
Block a user