Ticket #26235: 26235.diff

File 26235.diff, 875 bytes (added by Tim Graham, 9 years ago)
  • tests/admin_views/tests.py

    diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
    index 02ee00b..cc5c444 100644
    a b class AdminViewDeletedObjectsTest(TestCase):  
    20622062            '<li>Answer: <a href="%s">Yes.</a></li>' % reverse('admin:admin_views_answer_change', args=(a2.pk,))
    20632063        )
    20642064
     2065    def test_protected_delete_post(self):
     2066        q = Question.objects.create(question="Why?")
     2067        a1 = Answer.objects.create(question=q, answer="Because.")
     2068
     2069        response = self.client.post(reverse('admin:admin_views_question_delete', args=(q.pk,)), {
     2070            'post': 'yes',
     2071        })
     2072
    20652073    def test_not_registered(self):
    20662074        should_contain = """<li>Secret hideout: underground bunker"""
    20672075        response = self.client.get(reverse('admin:admin_views_villain_delete', args=(self.v1.pk,)))
Back to Top