Corrected tests from [10784]; instead of retrieving two comments, it was retrieving one comment twice.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
James Bennett 2009-05-15 02:54:55 +00:00
parent d246401552
commit bcb0d124b4
1 changed files with 3 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class CommentUtilsModeratorTests(CommentTestCase):
# emit the custom signals moderation listens for. # emit the custom signals moderation listens for.
e = Entry.objects.get(pk=1) e = Entry.objects.get(pk=1)
data = self.getValidData(e) data = self.getValidData(e)
self.client.post("/post/", data, REMOTE_ADDR="1.2.3.4")
self.client.post("/post/", data, REMOTE_ADDR="1.2.3.4") self.client.post("/post/", data, REMOTE_ADDR="1.2.3.4")
# We explicitly do a try/except to get the comment we've just # We explicitly do a try/except to get the comment we've just
@ -39,6 +39,8 @@ class CommentUtilsModeratorTests(CommentTestCase):
except IndexError: except IndexError:
c1 = None c1 = None
self.client.post("/post/", data, REMOTE_ADDR="1.2.3.4")
try: try:
c2 = Comment.objects.all()[0] c2 = Comment.objects.all()[0]
except IndexError: except IndexError: