]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
wsgi.run_server no longer used
authorAaron Rosen <aaronorosen@gmail.com>
Fri, 21 Feb 2014 04:15:21 +0000 (20:15 -0800)
committerAaron Rosen <aaronorosen@gmail.com>
Fri, 21 Feb 2014 04:15:21 +0000 (20:15 -0800)
Removes run_server method and test that is not used by anything.

Change-Id: I280c3e249b8e3f46de5a3d364a4a34ffc5acd064
Closes-bug: #1282873

neutron/tests/unit/test_wsgi.py
neutron/wsgi.py

index 27338b12a781c2bb79fe0f7edac4a3ea9acafad6..1ac1a73bd662194e5f22f67c6a0e0bf508aa455a 100644 (file)
@@ -841,19 +841,6 @@ class ResourceTest(base.BaseTestCase):
         self.assertEqual(500, result.status_int)
 
 
-class ServerTest(base.BaseTestCase):
-
-    def test_run_server(self):
-        with mock.patch('eventlet.listen') as listen:
-            with mock.patch('eventlet.wsgi.server') as server:
-                wsgi.run_server(mock.sentinel.application, mock.sentinel.port)
-                server.assert_called_once_with(
-                    listen.return_value,
-                    mock.sentinel.application
-                )
-            listen.assert_called_once_with(('0.0.0.0', mock.sentinel.port))
-
-
 class MiddlewareTest(base.BaseTestCase):
     def test_process_response(self):
         def application(environ, start_response):
index 9d9ff7b90ef823b29403c3fdbdef848602c27182..862e3f69ac57d220a4974c028eda50c459e4f145 100644 (file)
@@ -81,12 +81,6 @@ CONF.register_opts(socket_opts)
 LOG = logging.getLogger(__name__)
 
 
-def run_server(application, port):
-    """Run a WSGI server with the given application."""
-    sock = eventlet.listen(('0.0.0.0', port))
-    eventlet.wsgi.server(sock, application)
-
-
 class WorkerService(object):
     """Wraps a worker to be handled by ProcessLauncher"""
     def __init__(self, service, application):