def test_permission_required(self):
        self.user.user_permissions.remove(self.change_perm)
        self.user.user_permissions.remove(self.add_perm)
        data = self.get_valid_data()
        response = self.client.post(self.url, data=data)
        self.assertEqual(response.status_code, 403)
Return 403 if user does not have permissions to preview scribbles.
dataset/ETHPy150Open caktus/django-scribbler/scribbler/tests/test_views.py/PreviewTestCase.test_permission_required