Exemplo n.º 1
0
 def test_setup_responder(self):
     app = MagicMock()
     disp = MagicMock()
     disp.get_unused_endpoints.return_value = ['endpoint0',
                                               'endpoint1',
                                               'endpoint2']
     setup_responder(app, disp, 'compute')
     handler_calls = disp.set_handler.mock_calls
     self.assertEquals(len(handler_calls), 3)
     for i, (_, args, _) in enumerate(handler_calls):
         self.assertEquals(args[0], 'endpoint%s' % i)
         self.assertIsInstance(args[1], OpenStackResponder)
Exemplo n.º 2
0
 def test_setup_responder(self):
     app = MagicMock()
     disp = MagicMock()
     disp.get_unused_endpoints.return_value = [
         'endpoint0', 'endpoint1', 'endpoint2'
     ]
     setup_responder(app, disp, 'compute')
     handler_calls = disp.set_handler.mock_calls
     self.assertEqual(len(handler_calls), 3)
     for i, (_, args, _) in enumerate(handler_calls):
         self.assertEqual(args[0], 'endpoint%s' % i)
         self.assertIsInstance(args[1], OpenStackResponder)
Exemplo n.º 3
0
def setup_routes(app, disp):
    return setup_responder(app, disp, 'baremetal')
Exemplo n.º 4
0
def setup_routes(app, disp):
    return openstack.setup_responder(app, disp, 'image')
Exemplo n.º 5
0
def setup_routes(app, disp):
    return setup_responder(app, disp, "image")
Exemplo n.º 6
0
def setup_routes(app, disp):
    return setup_responder(app, disp, 'identity')
Exemplo n.º 7
0
def setup_routes(app, disp):
    return setup_responder(app, disp, 'compute')
Exemplo n.º 8
0
def setup_routes(app, disp):
    return openstack.setup_responder(app, disp, 'network')
Exemplo n.º 9
0
def setup_routes(app, disp):
    return openstack.setup_responder(app, disp, 'baremetal')
Exemplo n.º 10
0
def setup_routes(app, disp):
    return setup_responder(app, disp, 'image')
Exemplo n.º 11
0
def setup_routes(app, disp):
    return setup_responder(app, disp, 'network')
Exemplo n.º 12
0
def setup_routes(app, disp):
    return openstack.setup_responder(app, disp, 'identity')
Exemplo n.º 13
0
def setup_routes(app, disp):
    return setup_responder(app, disp, 'volume')