def test_delete_console(self):
        def fake_get_console(cons_self, context, instance_id, console_id):
            self.assertEqual(instance_id, self.uuid)
            self.assertEqual(console_id, 20)
            pool = dict(console_type='fake_type',
                    public_hostname='fake_hostname')
            return dict(id=console_id, password='fake_password',
                    port='fake_port', pool=pool)

        def fake_delete_console(cons_self, context, instance_id, console_id):
            self.assertEqual(instance_id, self.uuid)
            self.assertEqual(console_id, 20)

        self.stubs.Set(console.api.API, 'get_console', fake_get_console)
        self.stubs.Set(console.api.API, 'delete_console', fake_delete_console)

        req = fakes.HTTPRequest.blank(self.url + '/20')
        self.controller.delete(req, self.uuid, '20')