

def test_edit_topic_form(self):
    res = self.client.get(reverse('edit-committee-topic', kwargs={
        'committee_id': self.committee_1.id,
        'topic_id': self.topic.id,
    }))
    self.assertEqual(res.status_code, 302)
    self.assertTrue(self.client.login(username='ofri', password='ofri'))
    res = self.client.get(reverse('edit-committee-topic', kwargs={
        'committee_id': self.committee_1.id,
        'topic_id': self.topic.id,
    }))
    self.assertEqual(res.status_code, 403)
    self.assertTrue(self.client.login(username='jacob', password='JKM'))
    res = self.client.get(reverse('edit-committee-topic', kwargs={
        'committee_id': self.committee_1.id,
        'topic_id': self.topic.id,
    }))
    self.assertEqual(res.status_code, 200)
    self.assertTemplateUsed(res, 'committees/edit_topic.html')

dataset/ETHPy150Open ofri/Open-Knesset/committees/tests.py TopicsTest.test_edit_topic_form/original