def test_compute_node_delete(self): node = {'id': 'fake-id'} self.mox.StubOutWithMock(db, 'compute_node_delete') db.compute_node_delete(self.context, node['id']).AndReturn(None) self.mox.ReplayAll() result = self.conductor.compute_node_delete(self.context, node) self.assertEqual(result, None)
def test_destroy(self): self.mox.StubOutWithMock(db, 'compute_node_delete') db.compute_node_delete(self.context, 123) self.mox.ReplayAll() compute = compute_node.ComputeNode() compute.id = 123 compute.destroy(self.context)
def test_destroy(self): self.mox.StubOutWithMock(db, "compute_node_delete") db.compute_node_delete(self.context, 123) self.mox.ReplayAll() compute = compute_node.ComputeNode(context=self.context) compute.id = 123 compute.destroy()
def test_destroy(self): ctxt = context.get_admin_context() self.mox.StubOutWithMock(db, 'compute_node_delete') db.compute_node_delete(ctxt, 123) self.mox.ReplayAll() compute = compute_node.ComputeNode() compute.id = 123 compute.destroy(ctxt)
def destroy(self, context): db.compute_node_delete(context, self.id)
def destroy(self): db.compute_node_delete(self._context, self.id)