'User can edit a plugin if he has change permissions
on the model attached to the placeholder and he has
change permissions on the plugin model.'

def test_user_can_edit_plugin(self):

    staff_user = self._staff_user
    placeholder = self._obj.placeholder
    plugin = self._add_plugin_to_placeholder(placeholder)
    endpoint = self.get_change_plugin_uri(plugin, container=Example1)
    self.add_permission(staff_user, 'change_example1')
    self.add_permission(staff_user, 'change_link')
    with self.login_user_context(staff_user):
        data = model_to_dict(plugin, fields=['name', 'external_link'])
        data['name'] = 'A    link    2'
        response = self.client.post(endpoint, data)
        self.assertEqual(response.status_code, 200)
        plugin.refresh_from_db()
        self.assertEqual(plugin.name, data['name'])
