示例#1
0
    def test_run_app(self, m):
        random_port = random.randrange(1024, 65536)
        oslo.config.cfg.CONF.set_override('port', random_port, group='api')
        oslo.config.cfg.CONF.set_override('host', '127.0.0.1', group='api')

        d = app.build_server(self._make_app())
        self.assertEqual(('127.0.0.1', random_port), d.server_address)
示例#2
0
    def test_run_app(self, m):
        random_port = random.randrange(1024, 65536)
        oslo.config.cfg.CONF.set_override('port', random_port,
                                          group='api')
        oslo.config.cfg.CONF.set_override('host', '127.0.0.1',
                                          group='api')

        d = app.build_server(self._make_app())
        self.assertEqual(('127.0.0.1', random_port), d.server_address)
示例#3
0
def main():
    service.prepare_service()
    srv = app.build_server()
    srv.serve_forever()
示例#4
0
def main():
    service.prepare_service()
    srv = app.build_server()
    srv.serve_forever()