

def testAnnotationForbidden(self):
    self.jacob.groups.clear()
    self.assertTrue(self.client.login(username='jacob', password='JKM'))
    part = self.meeting_1.parts.list()[0]
    res = self.client.post(reverse('annotatetext-post_annotation'), {
        'selection_start': 7,
        'selection_end': 14,
        'flags': 0,
        'color': '#000',
        'lengthcheck': len(part.body),
        'comment': 'just perfect',
        'object_id': part.id,
        'content_type': ContentType.objects.get_for_model(part).id,
    })
    self.assertEqual(res.status_code, 403)

dataset/ETHPy150Open ofri/Open-Knesset/committees/tests.py CommitteeMeetingDetailViewTest.testAnnotationForbidden/original