

def test_delete_hosting_device_template_not_in_use_succeeds(self):
    ctx = n_context.get_admin_context()
    with self.hosting_device_template(no_delete=True) as hdt:
        hdt_id = hdt['hosting_device_template']['id']
        req = self.new_delete_request('hosting_device_templates', hdt_id)
        res = req.get_response(self.ext_api)
        self.assertEqual(204, res.status_int)
        self.assertRaises(ciscohostingdevicemanager.HostingDeviceTemplateNotFound, self._devmgr.get_hosting_device_template, ctx, hdt_id)

dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/tests/unit/cisco/device_manager/test_db_device_manager.py TestDeviceManagerDBPlugin.test_delete_hosting_device_template_not_in_use_succeeds/original