

def test_post_nonempty_collection(self):
    Document.objects.create(title='Test document', collection=self.collection)
    response = self.post()
    self.assertEqual(response.status_code, 403)
    self.assertTrue(Collection.objects.get(id=response.collection.id))

dataset/ETHPy150Open torchbox/wagtail/wagtail/wagtailadmin/tests/test_collections_views.py TestDeleteCollection.test_post_nonempty_collection/VarMisuse@58/71 `self`->`response`