How to use the ceilometer.openstack.common.fixture.moxstubout.MoxStubout function in ceilometer

To help you get started, we’ve selected a few ceilometer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openstack / ceilometer / tests / publisher / test_udp.py View on Github external
def setUp(self):
        super(TestUDPPublisher, self).setUp()
        self.mox = self.useFixture(moxstubout.MoxStubout()).mox
        self.CONF = self.useFixture(config.Config()).conf
github openstack / ceilometer / tests / image / test_glance.py View on Github external
def setUp(self):
        super(TestImagePollster, self).setUp()
        self.stubs = self.useFixture(moxstubout.MoxStubout()).stubs
        self.context = context.get_admin_context()
        self.manager = TestManager()
        self.stubs.Set(glance._Base, 'get_glance_client',
                       self.fake_get_glance_client)
github openstack / ceilometer / tests / publisher / test_rpc_publisher.py View on Github external
def setUp(self):
        super(TestPublish, self).setUp()
        self.CONF = self.useFixture(config.Config()).conf
        self.published = []
        self.rpc_unreachable = False
        self.stubs = self.useFixture(moxstubout.MoxStubout()).stubs
        self.stubs.Set(oslo_rpc, 'cast', self.faux_cast)
github openstack / ceilometer / tests / compute / virt / libvirt / test_inspector.py View on Github external
def setUp(self):
        super(TestLibvirtInspection, self).setUp()
        self.instance_name = 'instance-00000001'
        self.inspector = libvirt_inspector.LibvirtInspector()
        self.mox = self.useFixture(moxstubout.MoxStubout()).mox
        self.inspector.connection = self.mox.CreateMockAnything()
        self.domain = self.mox.CreateMockAnything()
github openstack / ceilometer / tests / api / v2 / test_app.py View on Github external
def setUp(self):
        super(TestApiMiddleware, self).setUp()
        self.stubs = self.useFixture(moxstubout.MoxStubout()).stubs
github openstack / ceilometer / tests / collector / test_service.py View on Github external
def setUp(self):
        super(TestUDPCollectorService, self).setUp()
        self.mox = self.useFixture(moxstubout.MoxStubout()).mox
        self.srv = service.UDPCollectorService()
        self.counter = sample.Sample(
            name='foobar',
            type='bad',
            unit='F',
            volume=1,
            user_id='jd',
            project_id='ceilometer',
            resource_id='cat',
            timestamp='NOW!',
            resource_metadata={},
        ).as_dict()
github openstack / ceilometer / tests / central / test_manager.py View on Github external
def setUp(self):
        super(TestRunTasks, self).setUp()
        self.stubs = self.useFixture(moxstubout.MoxStubout()).stubs
        self.stubs.Set(ksclient, 'Client', lambda *args, **kwargs: None)
github openstack / ceilometer / tests / storage / test_storage_scenarios.py View on Github external
def setUp(self):
        super(DBTestBase, self).setUp()
        self.stubs = self.useFixture(moxstubout.MoxStubout()).stubs
        self.prepare_data()