summaryrefslogtreecommitdiff
path: root/tests/regressiontests/comment_tests
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2010-01-04 02:29:12 +0000
committerJannis Leidel <jannis@leidel.info>2010-01-04 02:29:12 +0000
commitb9d698e9f238348494703acac67f119de973df25 (patch)
tree502a676a1997592f49296865aa91c411046173cf /tests/regressiontests/comment_tests
parentf6c519e2b919cddc438f6ff52f2b4d7ef8248042 (diff)
Fixed #10285 - Added render_comment_list template tag to comments app. Thanks Kyle Fuller for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12082 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/comment_tests')
-rw-r--r--tests/regressiontests/comment_tests/tests/templatetag_tests.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/regressiontests/comment_tests/tests/templatetag_tests.py b/tests/regressiontests/comment_tests/tests/templatetag_tests.py
index 7cb2148b54..669caff667 100644
--- a/tests/regressiontests/comment_tests/tests/templatetag_tests.py
+++ b/tests/regressiontests/comment_tests/tests/templatetag_tests.py
@@ -83,4 +83,15 @@ class CommentTemplateTagTests(CommentTestCase):
ctx, out = self.render(t, author=author)
self.assertEqual(out, "/cr/%s/%s/#c2-by-Joe Somebody" % (ct.id, author.id))
+ def testRenderCommentList(self, tag=None):
+ t = "{% load comments %}" + (tag or "{% render_comment_list for comment_tests.article a.id %}")
+ ctx, out = self.render(t, a=Article.objects.get(pk=1))
+ self.assert_(out.strip().startswith("<dl id=\"comments\">"))
+ self.assert_(out.strip().endswith("</dl>"))
+
+ def testRenderCommentListFromLiteral(self):
+ self.testRenderCommentList("{% render_comment_list for comment_tests.article 1 %}")
+
+ def testRenderCommentListFromObject(self):
+ self.testRenderCommentList("{% render_comment_list for a %}")