'User can\'t delete a plugin if he does not have
change permissions on the model attached to the placeholder
and/or does not have delete permissions on the plugin model.'

def test_user_cant_delete_plugin(self):

    staff_user = self._staff_user
    placeholder = self._obj.placeholder
    plugin = self._add_plugin_to_placeholder(placeholder)
    endpoint = self.get_delete_plugin_uri(plugin, container=Example1)
    self.add_permission(staff_user, 'add_example1')
    self.add_permission(staff_user, 'delete_example1')
    self.add_permission(staff_user, 'delete_link')
    with self.login_user_context(staff_user):
        data = {'post': True}
        response = self.client.post(endpoint, data)
        self.assertEqual(response.status_code, 403)
        self.assertTrue(CMSPlugin.objects.filter(pk=plugin.pk).exists())
    self.add_permission(staff_user, 'change_example1')
    self.remove_permission(staff_user, 'delete_link')
    with self.login_user_context(staff_user):
        data = {'post': True}
        response = self.client.post(endpoint, data)
        self.assertEqual(response.status_code, 403)
        self.assertTrue(CMSPlugin.objects.filter(pk=plugin.pk).exists())
