def test_add_with_contributor(self):
        request = self.factory.post(
            '/ajax/projects/%s/admins/' % self.project.id,
            {'user_id': self.user_to_add.id}
        )
        force_authenticate(request, user=self.contributor)
        view = ProjectAdmins.as_view()
        response = view(
            request,
            project_id=self.project.id
        ).render()

        self.assertEqual(response.status_code, 403)
        self.assertNotIn(
            self.user_to_add,
            Project.objects.get(pk=self.project.id).admins.all()
        )
dataset/ETHPy150Open ExCiteS/geokey/geokey/projects/tests/test_views.py/ProjectAdminsTest.test_add_with_contributor/original