

def test_post(self):
    response = self.post({
        'name': 'Holiday snaps',
    })
    self.assertRedirects(response, reverse('wagtailadmin_collections:index'))
    self.assertEqual(Collection.objects.filter(name='Holiday snaps').count(), 1)
    root_collection = Collection.get_first_root_node()
    self.assertEqual(Collection.objects.get(name='Holiday snaps').get_parent(), response)

dataset/ETHPy150Open torchbox/wagtail/wagtail/wagtailadmin/tests/test_collections_views.py TestAddCollection.test_post/VarMisuse@87/129 `root_collection`->`response`