Пример #1
0
 def test_glance_ipv6_context_service_enabled(self, mock_subprocess,
                                              mock_config):
     self.config.return_value = True
     mock_config.return_value = True
     mock_subprocess.return_value = 'true'
     ctxt = contexts.GlanceIPv6Context()
     self.assertEqual(ctxt(), {'bind_host': '::', 'registry_host': '[::]'})
Пример #2
0
 def test_glance_ipv6_context_service_disabled(self, mock_subprocess,
                                               mock_config):
     self.config.return_value = False
     mock_config.return_value = False
     mock_subprocess.return_value = 'false'
     ctxt = contexts.GlanceIPv6Context()
     self.assertEqual(ctxt(), {
         'bind_host': '0.0.0.0',
         'registry_host': '0.0.0.0'
     })