#12724: get_comment_permalink tests failing on Postgres -------------------------------------+-------------------------------------- Reporter: carljm | Owner: nobody Status: new | Milestone: Component: django.contrib.comments | Version: 1.1 Keywords: | Stage: Unreviewed Has_patch: 0 | -------------------------------------+-------------------------------------- The tests for get_comment_permalink rely on created comments having specific IDs. Postgres transaction rollbacks don't reset sequences (apparently), so the created comments have much higher IDs than expected under Postgres.
Best fix isn't immediately apparent to me: either the actual comment id needs to be stored somewhere the test can get at it, or the test needs to query for the comment to get the id, or the assertion needs to be agnostic about the actual id. {{{ (test_env)car...@kale:~/projects/django/django/django-hg$ python tests/runtests.py comment_tests ====================================================================== FAIL: testGetCommentPermalink (regressiontests.comment_tests.tests.templatetag_tests.CommentTemplateTagTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/carljm/projects/django/django/django- hg/tests/regressiontests/comment_tests/tests/templatetag_tests.py", line 75, in testGetCommentPermalink self.assertEqual(out, "/cr/%s/%s/#c2" % (ct.id, author.id)) AssertionError: u'/cr/13/1/#c71' != '/cr/13/1/#c2' ====================================================================== FAIL: testGetCommentPermalinkFormatted (regressiontests.comment_tests.tests.templatetag_tests.CommentTemplateTagTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/carljm/projects/django/django/django- hg/tests/regressiontests/comment_tests/tests/templatetag_tests.py", line 84, in testGetCommentPermalinkFormatted self.assertEqual(out, "/cr/%s/%s/#c2-by-Joe Somebody" % (ct.id, author.id)) AssertionError: u'/cr/13/1/#c75-by-Joe Somebody' != '/cr/13/1/#c2-by-Joe Somebody' ---------------------------------------------------------------------- Ran 81 tests in 3.114s FAILED (failures=2) }}} -- Ticket URL: <http://code.djangoproject.com/ticket/12724> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.