russ...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 46f0e24

[1.1.X] Fixed #13509 -- Modified the comment tests so that signal cleanup doesn't rely on garbage collection. Thanks to Alex Gaynor for the report and patch.

Backport of r13204 from trunk.

  • Participants
  • Parent commits 5d83025
  • Branches releases/1.1.X

Comments (0)

Files changed (1)

File tests/regressiontests/comment_tests/tests/

         actually getting saved
         def receive(sender, **kwargs): return False
-        signals.comment_will_be_posted.connect(receive)
+        signals.comment_will_be_posted.connect(receive, dispatch_uid="comment-test")
         a = Article.objects.get(pk=1)
         data = self.getValidData(a)
         response ="/post/", data)
         self.assertEqual(response.status_code, 400)
         self.assertEqual(Comment.objects.count(), 0)
+        signals.comment_will_be_posted.disconnect(dispatch_uid="comment-test")
     def testWillBePostedSignalModifyComment(self):