Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def setUp(self):
super(TestUDPPublisher, self).setUp()
self.mox = self.useFixture(moxstubout.MoxStubout()).mox
self.CONF = self.useFixture(config.Config()).conf
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)
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)
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()
def setUp(self):
super(TestApiMiddleware, self).setUp()
self.stubs = self.useFixture(moxstubout.MoxStubout()).stubs
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()
def setUp(self):
super(TestRunTasks, self).setUp()
self.stubs = self.useFixture(moxstubout.MoxStubout()).stubs
self.stubs.Set(ksclient, 'Client', lambda *args, **kwargs: None)
def setUp(self):
super(DBTestBase, self).setUp()
self.stubs = self.useFixture(moxstubout.MoxStubout()).stubs
self.prepare_data()