def test_ceilometer_enabled(self, shuffle_notifications, health, populate, scheduler, notifications, multiprocessing, neutron_api): self.test_config.config(enabled=True, group='ceilometer') notifications.Publisher = mock.Mock(spec=ak_notifications.Publisher) notifications.NoopPublisher = mock.Mock( spec=ak_notifications.NoopPublisher) main.main(argv=self.argv) self.assertEqual(len(notifications.Publisher.mock_calls), 2) self.assertEqual(len(notifications.NoopPublisher.mock_calls), 0)
def test_ensure_local_service_port(self, shuffle_notifications, health, populate, scheduler, notifications, multiprocessing, neutron_api): main.main(argv=self.argv) neutron = neutron_api.Neutron.return_value neutron.ensure_local_service_port.assert_called_once_with()