

def test_post(self):
    response = self.post()
    self.assertRedirects(response, reverse('wagtailadmin_collections:index'))
    with self.assertRaises(Collection.DoesNotExist):
        Collection.objects.get(id=self.collection.id)

dataset/ETHPy150Open torchbox/wagtail/wagtail/wagtailadmin/tests/test_collections_views.py TestDeleteCollection.test_post/original