'Add a plugin using the test client to check for permissions.'

def _add_plugin(self, user, page):

    with self.login_user_context(user):
        placeholder = page.placeholders.all()[0]
        post_data = {'body': 'Test'}
        endpoint = self.get_add_plugin_uri(placeholder, 'TextPlugin')
        response = self.client.post(endpoint, post_data)
        self.assertEqual(response.status_code, 302)
        return response.content.decode('utf8')
