Skip to content

Commit 81f742c

Browse files
committed
add test to make sure we can return a template
1 parent 41ca626 commit 81f742c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: example_project/test_app/tests.py

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ def test_tool_can_return_httpresponse(self):
3838
self.assertEqual(response.status_code, 302)
3939
self.assertTrue(response['location'].endswith('/admin/polls/poll/1/'))
4040

41+
def test_can_return_template(self):
42+
url = '/admin/polls/poll/1/tools/delete_all_choices/'
43+
response = self.client.get(url)
44+
self.assertTemplateUsed(response, "clear_choices.html")
45+
4146
def test_intermediate_page_with_post_works(self):
4247
self.assertTrue(Choice.objects.filter(poll=1).count())
4348
url = '/admin/polls/poll/1/tools/delete_all_choices/'

0 commit comments

Comments
 (0)