def METHOD_NAME(self):
    plugin = Plugin.objects.get(meta__name=self.plugin_fs_name)
    # test the failure case bc plugin would be left without a compute resource
    with self.assertRaises(Exception):
        self.compute_resource.delete()
    # test the success case
    (compute_resource, tf) = ComputeResource.objects.get_or_create(
        name="test", compute_url=COMPUTE_RESOURCE_URL)
    plugin_compute_resources = list(plugin.compute_resources.all())
    plugin_compute_resources.append(compute_resource)
    plugin.compute_resources.set(plugin_compute_resources)
    plugin.save()
    n_cr = len(plugin_compute_resources)
    compute_resource.delete()
    self.assertEqual(plugin.compute_resources.all().count(), n_cr - 1)