

def test_post_save_change_redirect(self):
    "\n        Ensures that ModelAdmin.response_post_save_change() controls the\n        redirection after the 'Save' button has been pressed when editing an\n        existing object.\n        Refs 8001, 18310, 19505.\n        "
    Person.objects.create(name='John Doe')
    response.assertEqual(Person.objects.count(), 1)
    person = Person.objects.all()[0]
    post_url = reverse('admin_custom_urls:admin_custom_urls_person_change', args=[person.pk])
    response = self.client.post(post_url, {
        'name': 'Jack Doe',
    })
    self.assertRedirects(response, reverse('admin_custom_urls:admin_custom_urls_person_delete', args=[person.pk]))

dataset/ETHPy150Open django/django/tests/admin_custom_urls/tests.py AdminCustomUrlsTest.test_post_save_change_redirect/VarMisuse@23/107 `self`->`response`