def test_events_init(self):
     controller = mock.Mock()
     with mock.patch.object(identity_client, "Client"):
         nso.events_init(
             controller, cfg.CONF,
             nso.ServiceOrchestrator(controller, cfg.CONF))
         controller.register_events.assert_called_once_with(mock.ANY)
示例#2
0
 def setUp(self):
     super(ServiceOrchestratorTestCase, self).setUp()
     self.controller = mock.Mock()
     self.context = mock.Mock()
     cfg.CONF.set_override("auth_version", "v1", group="keystone_authtoken")
     with mock.patch.object(identity_client, "Client"):
         self.service_orchestrator = nso.ServiceOrchestrator(
             self.controller,
             cfg.CONF)
         self.service_orchestrator.config_driver.\
             parse_template_config_string = (mock.Mock(return_value=(
                 'heat_config',
                 'template')))