Exemple #1
0
 def test_get_callback_endpoint_override(self):
     CONF.set_override('callback_endpoint_override', 'http://url',
                       group='inspector')
     client = mock.Mock()
     self.assertEqual('http://url/v1/continue',
                      inspector._get_callback_endpoint(client))
     self.assertFalse(client.get_endpoint.called)
Exemple #2
0
 def test_get_callback_endpoint_mdns(self):
     CONF.set_override('callback_endpoint_override',
                       'mdns',
                       group='inspector')
     client = mock.Mock()
     self.assertEqual('mdns', inspector._get_callback_endpoint(client))
     self.assertFalse(client.get_endpoint.called)
Exemple #3
0
 def test_get_callback_endpoint(self):
     for catalog_endp in ['http://192.168.0.42:5050',
                          'http://192.168.0.42:5050/v1',
                          'http://192.168.0.42:5050/']:
         client = mock.Mock()
         client.get_endpoint.return_value = catalog_endp
         self.assertEqual('http://192.168.0.42:5050/v1/continue',
                          inspector._get_callback_endpoint(client))