'Start WSGI server with a test application.'

def _run_wsgi(self, workers=1):

    with mock.patch('neutron.wsgi.WorkerService.start') as start_method:
        start_method.side_effect = self._fake_start
        server = wsgi.Server('Test')
        server.start(self.application, 0, '0.0.0.0', workers=workers)
        self.port = server.port
        os.write(self.pipeout, bytes(self.port))
        server.wait()
